-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from invariant-labs/configure-eslint-and-prettier
configure eslint and prettier
- Loading branch information
Showing
85 changed files
with
6,651 additions
and
8,447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"quoteProps": "as-needed", | ||
"semi": false, | ||
"tabWidth": 2, | ||
"trailingComma": "none", | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"printWidth": 100, | ||
"bracketSameLine": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,43 @@ | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
import reactHooks from "eslint-plugin-react-hooks"; | ||
import reactRefresh from "eslint-plugin-react-refresh"; | ||
import tseslint from "typescript-eslint"; | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import reactHooks from 'eslint-plugin-react-hooks' | ||
import reactRefresh from 'eslint-plugin-react-refresh' | ||
import tseslint from 'typescript-eslint' | ||
|
||
export default tseslint.config( | ||
{ ignores: ["dist"] }, | ||
{ ignores: ['dist'] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ["**/*.{ts,tsx}"], | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
globals: globals.browser | ||
}, | ||
plugins: { | ||
"react-hooks": reactHooks, | ||
"react-refresh": reactRefresh, | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh | ||
}, | ||
rules: { | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
indent: "off", | ||
"@typescript-eslint/indent": "off", | ||
"multiline-ternary": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/prefer-reduce-type-parameter": "off", | ||
"@typescript-eslint/strict-boolean-expressions": "off", | ||
"@typescript-eslint/space-before-function-paren": "off", | ||
"@typescript-eslint/prefer-nullish-coalescing": "off", | ||
"@typescript-eslint/member-delimiter-style": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"generator-star-spacing": ["error", { before: false, after: true }], | ||
"yield-star-spacing": ["error", { before: false, after: true }], | ||
"react-hooks/exhaustive-deps": "off", | ||
"react-hooks/rules-of-hooks": "error", | ||
"@typescript-eslint/no-unused-expressions": "off", | ||
"@typescript-eslint/no-empty-object-type": "off", | ||
"no-extra-boolean-cast": "off", | ||
}, | ||
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], | ||
indent: 'off', | ||
'@typescript-eslint/indent': 'off', | ||
'multiline-ternary': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/prefer-reduce-type-parameter': 'off', | ||
'@typescript-eslint/strict-boolean-expressions': 'off', | ||
'@typescript-eslint/space-before-function-paren': 'off', | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', | ||
'@typescript-eslint/member-delimiter-style': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'generator-star-spacing': ['error', { before: false, after: true }], | ||
'yield-star-spacing': ['error', { before: false, after: true }], | ||
'react-hooks/exhaustive-deps': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'no-extra-boolean-cast': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
'@typescript-eslint/no-empty-object-type': 'off' | ||
} | ||
} | ||
); | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,41 @@ | ||
import { Button, Grid, Typography } from "@mui/material"; | ||
import classNames from "classnames"; | ||
import React from "react"; | ||
import { useStyles } from "./style"; | ||
import icons from "@static/icons"; | ||
import { Button, Grid, Typography } from '@mui/material' | ||
import classNames from 'classnames' | ||
import React from 'react' | ||
import { useStyles } from './style' | ||
import icons from '@static/icons' | ||
|
||
export interface IEmptyPlaceholder { | ||
desc: string; | ||
onAction?: () => void; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
withButton?: boolean; | ||
buttonName?: string; | ||
desc: string | ||
onAction?: () => void | ||
className?: string | ||
style?: React.CSSProperties | ||
withButton?: boolean | ||
buttonName?: string | ||
} | ||
|
||
export const EmptyPlaceholder: React.FC<IEmptyPlaceholder> = ({ | ||
desc, | ||
onAction, | ||
withButton = true, | ||
buttonName, | ||
buttonName | ||
}) => { | ||
const { classes } = useStyles(); | ||
const { classes } = useStyles() | ||
|
||
return ( | ||
<> | ||
<Grid className={classNames(classes.blur, "blurLayer")} /> | ||
<Grid className={classNames(classes.container, "blurLayer")}> | ||
<Grid className={classNames(classes.root, "blurInfo")}> | ||
<img className={classes.img} src={icons.empty} alt="Not connected" /> | ||
<Grid className={classNames(classes.blur, 'blurLayer')} /> | ||
<Grid className={classNames(classes.container, 'blurLayer')}> | ||
<Grid className={classNames(classes.root, 'blurInfo')}> | ||
<img className={classes.img} src={icons.empty} alt='Not connected' /> | ||
<Typography className={classes.desc}>It's empty here...</Typography> | ||
{desc?.length && ( | ||
<Typography className={classes.desc}>{desc}</Typography> | ||
)} | ||
{desc?.length && <Typography className={classes.desc}>{desc}</Typography>} | ||
{withButton && ( | ||
<Button | ||
className={classes.button} | ||
onClick={onAction} | ||
variant="contained" | ||
> | ||
{!!buttonName ? buttonName : "Add a position"} | ||
<Button className={classes.button} onClick={onAction} variant='contained'> | ||
{!!buttonName ? buttonName : 'Add a position'} | ||
</Button> | ||
)} | ||
</Grid> | ||
</Grid> | ||
</> | ||
); | ||
}; | ||
) | ||
} |
Oops, something went wrong.