-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
27 lines (27 loc) · 935 Bytes
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// eslint-disable-next-line no-undef
module.exports = {
env: { browser: true, es2020: true },
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh', 'unused-imports'],
rules: {
'react-refresh/only-export-components': 'warn',
indent: ['error', 2, { SwitchCase: 1 }],
'max-len': ['error', { code: 120, ignoreComments: true }],
'linebreak-style': ['error', 'unix'],
'quote-props': ['error', 'as-needed'],
'jsx-quotes': ['error', 'prefer-double'],
semi: ['error', 'never'],
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_'
}
]
}
}