-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COM-3545]: apply new linter rules and fix some code
- Loading branch information
1 parent
f89bb4c
commit 55e47af
Showing
115 changed files
with
1,146 additions
and
411 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 |
---|---|---|
@@ -1,34 +1,30 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
requireConfigFile: false, | ||
}, | ||
extends: '@csssr/eslint-config-core', | ||
plugins: ['react-hooks', '@emotion'], | ||
extends: [ | ||
require.resolve('@csssr/linters/eslint/base'), | ||
require.resolve('@csssr/linters/eslint/react'), | ||
], | ||
plugins: ['@emotion'], | ||
rules: { | ||
'prettier/prettier': [ | ||
// Отключения | ||
'react/prop-types': 'off', // потому что много где нет | ||
'react/forbid-prop-types': 'off', // чтобы можно было оставить object и не уточнять до shape | ||
'jsx-a11y/anchor-is-valid': 'off', // потому что Next | ||
'react/no-danger': 'off', // потому что много где используется | ||
'no-nested-ternary': 'off', | ||
|
||
// Донастройка | ||
camelcase: [ | ||
'error', | ||
{ | ||
useTabs: false, | ||
printWidth: 100, | ||
semi: false, | ||
singleQuote: true, | ||
jsxSingleQuote: false, | ||
trailingComma: 'all', | ||
bracketSpacing: true, | ||
properties: 'never', | ||
}, | ||
], | ||
'react/react-in-jsx-scope': 'off', | ||
'react/prop-types': 'off', | ||
'react/jsx-no-target-blank': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
|
||
// Доп. правила | ||
'@emotion/pkg-renaming': 'error', | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
} |
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,9 @@ | ||
module.exports = { | ||
useTabs: false, | ||
printWidth: 100, | ||
semi: false, | ||
singleQuote: true, | ||
jsxSingleQuote: false, | ||
trailingComma: 'all', | ||
bracketSpacing: 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
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
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
Oops, something went wrong.