forked from blockscout/frontend
-
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.
- Loading branch information
1 parent
6b2c5d2
commit f7d389b
Showing
11 changed files
with
742 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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,246 @@ | ||
module.exports = { | ||
env: { | ||
es6: true, | ||
browser: true, | ||
node: true, | ||
}, | ||
'extends': [ | ||
'next/core-web-vitals', | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:regexp/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
plugins: [ | ||
'es5', | ||
'react', | ||
'regexp', | ||
'@typescript-eslint', | ||
'react-hooks', | ||
'jsx-a11y', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
settings: { | ||
react: { | ||
pragma: 'React', | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
'@typescript-eslint/array-type': [ 'error', { | ||
'default': 'generic', | ||
readonly: 'generic', | ||
} ], | ||
'@typescript-eslint/brace-style': [ 'error', '1tbs' ], | ||
'@typescript-eslint/consistent-type-imports': [ 'error' ], | ||
'@typescript-eslint/indent': [ 'error', 2 ], | ||
'@typescript-eslint/member-delimiter-style': [ 'error' ], | ||
'@typescript-eslint/naming-convention': [ 'error', | ||
{ | ||
selector: 'default', | ||
format: [ 'camelCase' ], | ||
leadingUnderscore: 'allow', | ||
trailingUnderscore: 'forbid', | ||
}, | ||
{ | ||
selector: 'class', | ||
format: [ 'PascalCase' ], | ||
}, | ||
{ | ||
selector: 'enum', | ||
format: [ 'PascalCase', 'UPPER_CASE' ], | ||
}, | ||
{ | ||
selector: 'enumMember', | ||
format: [ 'camelCase', 'PascalCase', 'UPPER_CASE' ], | ||
}, | ||
{ | ||
selector: 'function', | ||
format: [ 'camelCase', 'PascalCase' ], | ||
}, | ||
{ | ||
selector: 'interface', | ||
format: [ 'PascalCase' ], | ||
}, | ||
{ | ||
selector: 'method', | ||
format: [ 'camelCase', 'snake_case', 'UPPER_CASE' ], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ | ||
selector: 'parameter', | ||
format: [ 'camelCase', 'PascalCase' ], | ||
leadingUnderscore: 'allow', | ||
}, | ||
{ | ||
selector: 'property', | ||
format: null, | ||
}, | ||
{ | ||
selector: 'typeAlias', | ||
format: [ 'PascalCase' ], | ||
}, | ||
{ | ||
selector: 'typeParameter', | ||
format: [ 'PascalCase', 'UPPER_CASE' ], | ||
}, | ||
{ | ||
selector: 'variable', | ||
format: [ 'camelCase', 'PascalCase', 'UPPER_CASE' ], | ||
leadingUnderscore: 'allow', | ||
}, | ||
], | ||
'@typescript-eslint/no-duplicate-imports': [ 'error' ], | ||
'@typescript-eslint/no-empty-function': [ 'off' ], | ||
'@typescript-eslint/no-unused-vars': [ 'error', { ignoreRestSiblings: true } ], | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-useless-constructor': [ 'error' ], | ||
'@typescript-eslint/type-annotation-spacing': 'error', | ||
|
||
// отключены в пользу @typescript-eslint | ||
'brace-style': 'off', | ||
camelcase: 'off', | ||
indent: 'off', | ||
'no-unused-vars': 'off', | ||
'no-use-before-define': 'off', | ||
'no-useless-constructor': 'off', | ||
|
||
'array-bracket-spacing': [ 'error', 'always' ], | ||
'arrow-spacing': [ 'error', { before: true, after: true } ], | ||
'comma-dangle': [ 'error', 'always-multiline' ], | ||
'comma-spacing': [ 'error' ], | ||
'comma-style': [ 'error', 'last' ], | ||
curly: [ 'error', 'all' ], | ||
'eol-last': 'error', | ||
eqeqeq: [ 'error', 'allow-null' ], | ||
'id-match': [ 'error', '^[\\w$]+$' ], | ||
'jsx-quotes': [ 'error', 'prefer-double' ], | ||
'key-spacing': [ 'error', { | ||
beforeColon: false, | ||
afterColon: true, | ||
} ], | ||
'keyword-spacing': 'error', | ||
'linebreak-style': [ 'error', 'unix' ], | ||
'lines-around-comment': [ 'error', { | ||
beforeBlockComment: true, | ||
allowBlockStart: true, | ||
} ], | ||
'max-len': [ 'error', 160, 4 ], | ||
'no-console': 'error', | ||
'no-empty': [ 'error', { allowEmptyCatch: true } ], | ||
'no-implicit-coercion': [ 'error', { | ||
number: true, | ||
'boolean': true, | ||
string: true, | ||
} ], | ||
'no-mixed-operators': [ 'error', { | ||
groups: [ | ||
[ '&&', '||' ], | ||
], | ||
} ], | ||
'no-mixed-spaces-and-tabs': 'error', | ||
'no-multiple-empty-lines': [ 'error', { | ||
max: 1, | ||
maxEOF: 0, | ||
maxBOF: 0, | ||
} ], | ||
'no-multi-spaces': 'error', | ||
'no-multi-str': 'error', | ||
'no-nested-ternary': 'error', | ||
'no-trailing-spaces': 'error', | ||
'no-spaced-func': 'error', | ||
'no-with': 'error', | ||
'object-curly-spacing': [ 'error', 'always' ], | ||
'object-shorthand': 'off', | ||
'one-var': [ 'error', 'never' ], | ||
'operator-linebreak': [ 'error', 'after' ], | ||
'prefer-const': 'error', | ||
'quote-props': [ 'error', 'as-needed', { | ||
keywords: true, | ||
numbers: true, | ||
} ], | ||
quotes: [ 'error', 'single', { | ||
allowTemplateLiterals: true, | ||
} ], | ||
'space-before-function-paren': [ 'error', 'never' ], | ||
'space-before-blocks': [ 'error', 'always' ], | ||
'space-in-parens': [ 'error', 'never' ], | ||
'space-infix-ops': 'error', | ||
'space-unary-ops': 'off', | ||
'template-curly-spacing': [ 'error', 'always' ], | ||
'wrap-iife': [ 'error', 'inside' ], | ||
|
||
'react/jsx-key': 'error', | ||
'react/jsx-no-bind': [ 'error', { | ||
ignoreRefs: true, | ||
} ], | ||
'react/jsx-curly-brace-presence': [ 'error', { | ||
props: 'never', | ||
children: 'never', | ||
} ], | ||
'react/jsx-curly-spacing': [ 'error', { | ||
when: 'always', | ||
children: true, | ||
spacing: { | ||
objectLiterals: 'never', | ||
}, | ||
} ], | ||
'react/jsx-equals-spacing': [ 'error', 'never' ], | ||
'react/jsx-fragments': [ 'error', 'syntax' ], | ||
'react/jsx-no-duplicate-props': 'error', | ||
'react/jsx-no-target-blank': 'off', | ||
'react/jsx-no-useless-fragment': 'error', | ||
'react/jsx-tag-spacing': [ 'error', { | ||
afterOpening: 'never', | ||
beforeSelfClosing: 'never', | ||
closingSlash: 'never', | ||
} ], | ||
'react/jsx-wrap-multilines': [ 'error', { | ||
declaration: 'parens-new-line', | ||
assignment: 'parens-new-line', | ||
'return': 'parens-new-line', | ||
arrow: 'parens-new-line', | ||
condition: 'parens-new-line', | ||
logical: 'parens-new-line', | ||
prop: 'parens-new-line', | ||
} ], | ||
'react/no-access-state-in-setstate': 'error', | ||
'react/no-deprecated': 'error', | ||
'react/no-direct-mutation-state': 'error', | ||
'react/no-find-dom-node': 'off', | ||
'react/no-redundant-should-component-update': 'error', | ||
'react/no-render-return-value': 'error', | ||
'react/no-string-refs': 'off', | ||
'react/no-unknown-property': 'error', | ||
'react/no-unused-state': 'error', | ||
'react/require-optimization': [ 'error' ], | ||
'react/void-dom-elements-no-children': 'error', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'error', | ||
|
||
'regexp/confusing-quantifier': 'error', | ||
'regexp/control-character-escape': 'error', | ||
'regexp/negation': 'error', | ||
'regexp/no-dupe-disjunctions': 'error', | ||
'regexp/no-empty-alternative': 'error', | ||
'regexp/no-empty-capturing-group': 'error', | ||
'regexp/no-lazy-ends': 'error', | ||
'regexp/no-obscure-range': [ 'error', { | ||
allowed: [ 'alphanumeric', 'А-Я', 'а-я' ], | ||
} ], | ||
'regexp/no-optional-assertion': 'error', | ||
'regexp/no-unused-capturing-group': [ 'error', { | ||
fixable: true, | ||
} ], | ||
'regexp/no-useless-character-class': 'error', | ||
'regexp/no-useless-dollar-replacements': 'error', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -33,3 +33,5 @@ yarn-error.log* | |
|
||
# typescript | ||
*.tsbuildinfo | ||
|
||
.eslintcache |
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 @@ | ||
_ |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,12 +1,13 @@ | ||
import type { AppProps } from 'next/app' | ||
import {ChakraProvider} from '@chakra-ui/react'; | ||
import React from 'react'; | ||
import type { AppProps } from 'next/app'; | ||
import { ChakraProvider } from '@chakra-ui/react'; | ||
|
||
function MyApp({ Component, pageProps }: AppProps) { | ||
return ( | ||
<ChakraProvider> | ||
<Component {...pageProps} /> | ||
<Component { ...pageProps }/> | ||
</ChakraProvider> | ||
) | ||
); | ||
} | ||
|
||
export default MyApp |
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,12 +1,13 @@ | ||
import type { NextPage } from 'next' | ||
import {Center} from '@chakra-ui/react'; | ||
import React from 'react'; | ||
import type { NextPage } from 'next'; | ||
import { Center } from '@chakra-ui/react'; | ||
|
||
const Home: NextPage = () => { | ||
return ( | ||
<Center w='100%' h='100vh'> | ||
Home Page | ||
<Center w="100%" h="100vh"> | ||
Home Page | ||
</Center> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default Home |
Oops, something went wrong.