-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
95 lines (95 loc) · 2.69 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
92
93
94
95
/* eslint-disable */
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['plugin:react/recommended', 'airbnb', 'prettier'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
},
plugins: ['react', 'prettier'],
settings: {
'import/resolver': {
alias: {
map: [
// And all your import aliases
['@', './src'],
// ['@/components, './src/components'],
],
extensions: ['.ts', '.js', '.jsx', '.json'],
},
},
},
rules: {
'prettier/prettier': [
'warn',
{
endOfLine: 'auto',
},
],
// 'no-undef': 1,
'react/no-children-prop': 'warn',
'no-case-declarations': 'warn',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], // should add ".ts" if typescript project
'no-unused-vars': 'off' /* 'warn' */,
'react/no-unescaped-entities': 'off',
'no-console': 'off',
'import/first': 'off',
'import/no-cycle': 'off',
'react/prop-types': 'off',
'jsx-a11y/href-no-hash': 'off',
'react/display-name': 'off',
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
'react/button-has-type': 'off',
'func-names': 'off',
'no-unused-expressions': 'off',
'no-param-reassign': 'warn',
'react/jsx-props-no-spreading': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/function-component-definition': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'linebreak-style': ['off'],
'react/jsx-no-script-url': 'warn',
'no-script-url': 'warn',
'jsx-a11y/tabindex-no-positive': 'warn',
'jsx-a11y/anchor-is-valid': 'warn',
'react/self-closing-comp': 'warn',
'react/jsx-curly-brace-presence': 'off',
'jsx-a11y/alt-text': 'warn',
'react/no-array-index-key': 'warn',
'react/no-unstable-nested-components': 'warn',
'no-unreachable': 'warn',
'no-nested-ternary': 'warn',
'react/destructuring-assignment': 'warn',
'jsx-a11y/alt-text': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',
'jsx-a11y/no-static-element-interactions': 'warn',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'default-param-last': 'warn',
camelcase: 'warn',
eqeqeq: 'warn',
'no-useless-escape': 'off',
'import/order': 'warn',
'no-underscore-dangle': 'warn',
'no-empty': 'warn',
'prefer-template': 'warn',
'object-shorthand': 'warn',
'no-shadow': 'warn',
indent: [
'warn',
2,
{
SwitchCase: 2,
},
],
},
}