-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.eslintrc.js
91 lines (91 loc) · 2.27 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = {
env: {
browser: true,
node: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'plugin:prettier/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
parser: '@typescript-eslint/parser',
plugins: ['react', 'module-resolver', 'prettier', '@typescript-eslint'],
rules: {
// ISSUE: https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined/
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
// ---
// 'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'prettier/prettier': 'error',
'implicit-arrow-linebreak': 'off',
'function-paren-newline': 'off',
semi: 'off',
'no-shadow': 'off',
'no-undef': 'off',
'react/jsx-curly-brace-presence': 'off',
'react/no-danger': 'off',
camelcase: 'off',
'consistent-return': 'off',
'no-underscore-dangle': 'off',
'jsx-a11y/label-has-for': 'off',
'react/state-in-constructor': 'off',
'react/jsx-wrap-multilines': 'off',
'react/require-default-props': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prefer-stateless-function': 'off',
'jsx-a11y/interactive-supports-focus': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'react/jsx-filename-extension': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-fragments': [2, 'element'],
'jsx-a11y/anchor-is-valid': 'off',
'import/no-unresolved': [
2,
{
ignore: [
'@nexys',
'components',
'css',
'containers',
'contexts',
'fields',
'stores',
'styles',
'utils',
'views',
'pages',
'models',
'icons',
'hooks',
'data',
'routes',
'constant',
'constants',
'svgs',
'validations',
'shortcuts',
'library',
'proptypes',
'services',
'layouts',
'helpers',
'images',
'HOC',
'assets',
],
},
],
},
}