-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
.eslintrc.js
63 lines (63 loc) · 1.48 KB
/
.eslintrc.js
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
// TODO: Update this config... https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/
// TODO: Please I already forgot :sob:
module.exports = {
env: {
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
overrides: [
{
files: ['*.jsx', '*.tsx', '*.ts'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'no-console': ['error', { allow: ['warn', 'error', 'debug'] }],
'react/react-in-jsx-scope': 'off',
},
},
{
files: ['*.config.js', '.eslintrc.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'import/no-commonjs': 'off',
'sort-keys': 'off',
'unicorn/prefer-module': 'off',
},
},
{
files: ['**/__tests__/**/*', '*.test.ts', '*.test.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: 'tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'simple-import-sort', 'prettier', 'sort-keys-fix', 'react'],
root: true,
rules: {
'import/no-unresolved': 'off',
'import/no-useless-path-segments': 'off',
'no-console': 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'sort-keys-fix/sort-keys-fix': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
}