-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
57 lines (57 loc) · 1.75 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
module.exports = {
extends: ['airbnb', 'prettier', 'plugin:react/recommended'],
env: {
browser: true,
node: true,
jasmine: true,
jest: true,
es6: true,
},
// parser: '@babel/eslint-parser',
// parserOptions: {
// requireConfigFile: false,
// ecmaFeatures: {
// jsx: true,
// },
// },
plugins: ['react', 'react-hooks', 'babel'],
rules: {
'react/jsx-one-expression-per-line': 0,
'react/prop-types': 0,
'react/forbid-prop-types': 0,
'react/jsx-indent': 0,
'react/jsx-wrap-multilines': [
'error',
{ declaration: false, assignment: false },
],
'react/jsx-filename-extension': 0,
'react/state-in-constructor': 0,
'react/jsx-props-no-spreading': 0,
'react/destructuring-assignment': 0, // TODO: remove later
'react/require-default-props': 0,
'react/sort-comp': 0,
'react/display-name': 0,
'react/static-property-placement': 0,
'react/no-find-dom-node': 0,
'react/no-unused-prop-types': 0,
'react/default-props-match-prop-types': 0,
'react-hooks/rules-of-hooks': 2, // Checks rules of Hooks
'react-hooks/exhaustive-deps': 1,
'import/extensions': 0,
'import/no-cycle': 0,
'import/prefer-default-export': 0,
// 'comma-dangle': ['error', 'always-multiline'],
'consistent-return': 0, // TODO: remove later
'no-param-reassign': 0, // TODO: remove later
'no-underscore-dangle': 0,
// for (let i = 0; i < len; i++)
'no-plusplus': 0,
// https://eslint.org/docs/rules/no-continue
// labeledLoop is conflicted with `eslint . --fix`
'no-continue': 0,
'jsx-a11y/label-has-associated-control': 0,
// ban this for Number.isNaN needs polyfill
'no-restricted-globals': 0,
'max-classes-per-file': 0,
},
};