-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
77 lines (77 loc) · 2.22 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
module.exports = {
root: true,
extends: ['react-app', 'react-app/jest'],
plugins: ['simple-import-sort'],
settings: {
react: {
version: '17.0.2',
},
},
rules: {
// 'simple-import-sort/imports': [
// 'error',
// {
// groups: [
// // Third party packages, `react` related packages come first.
// ['^react', '^@?\\w'],
// // Internal packages.
// ['^@brick(/.*|$)'],
// // Side effect imports.
// ['^\\u0000'],
// // Relative imports. e.g. `@|src|..|.` started imports, put same-folder imports and `..`, `.` at last.
// [
// '^(@|src)([^.]+$)',
// '^\\.\\.(?!/?$)',
// '^\\.\\./?$',
// '^\\./(?=.*/)(?!/?$)',
// '^\\.(?!/?$)',
// '^\\./?$',
// ],
// // Assets imports
// ['^\\S+\\.(?:(png|svg|jpg|jpeg|gif))', '^.+\\.(scss|less|css)$'],
// ],
// },
// ],
'import/newline-after-import': ['error', { count: 1 }],
'import/no-duplicates': 'error',
'import/no-anonymous-default-export': 'off',
'react/jsx-key': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'react/no-array-index-key': 'off',
'react/jsx-pascal-case': 'off',
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/alt-text': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/iframe-has-title': 'off',
'no-unused-vars': 'off',
'no-empty-pattern': 'off',
'no-useless-escape': 'off',
'no-template-curly-in-string': 'off',
'eqeqeq': 'off',
'no-restricted-globals': 'off',
'jsx-a11y/anchor-has-content': 'off',
},
overrides: [
{
files: ['{packages,projects}/*/**/*.js'],
rules: {
'import/no-commonjs': 'off',
},
},
{
files: ['{packages,projects}/*/tests/**/*'],
rules: {
'no-magic-numbers': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
files: ['{packages,projects}/*/tests/examples?/**/*', 'examples/**/*'],
rules: {
'no-console': 'off',
},
},
],
};