-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
68 lines (68 loc) · 1.9 KB
/
.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:import/errors',
"eslint-config-prettier"
],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh', 'import', 'prettier'],
rules: {
'react-refresh/only-export-components': 'warn',
indent: ['error', 2, {SwitchCase: 1}],
'react/jsx-indent': [2, 2],
'react/jsx-indent-props': [2, 2],
'react/jsx-filename-extension': [2, {
extensions: ['.js', '.jsx', '.tsx'],
}],
'quotes': [2, 'single', 'avoid-escape'],
'no-multiple-empty-lines': ['warn', {max: 1}],
'import/no-unresolved': 'off',
'react/react-in-jsx-scope': 'off',
'react/function-component-definition': 'off',
'import/extensions': 'off',
'no-restricted-exports': 'warn',
'no-underscore-dangle': 'off',
'object-curly-spacing': ['error', 'always'],
semi: ["error", "always"],
'max-len': ['error', {
code: 150,
ignoreComments: true,
ignoreUrls: true,
}],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'import/order': [
'error',
{
groups: [
'external',
'parent',
'sibling',
'index',
],
pathGroups: [
{
pattern: '~/**',
group: 'parent',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/named': 'off',
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn"],
"prettier/prettier": "error",
},
}