-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
executable file
·83 lines (83 loc) · 2.34 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
node: true,
es6: true,
browser: true,
jest: true,
},
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
rules: {
'indent': [0, 0],
'semi': [2, 'never'],
'quotes': ['error', 'single'],
'block-spacing': [2, 'always'],
'@typescript-eslint/indent': [0],
'@typescript-eslint/camelcase': [0],
'@typescript-eslint/explicit-function-return-type': [0],
'@typescript-eslint/no-explicit-any': [0],
'@typescript-eslint/ban-types': [0],
'arrow-parens': [2, 'as-needed', {requireForBlockBody: false}],
'no-use-before-define': [1],
'camelcase': [0],
'quote-props': [2, 'consistent-as-needed'],
'no-restricted-globals': [0],
'no-restricted-properties': [0],
'no-confusing-arrow': [0],
'implicit-arrow-linebreak': [0],
'no-underscore-dangle': [0],
'comma-dangle': [2, 'always-multiline'],
'max-len': [2, 120, {ignoreComments: true, ignoreUrls: true}],
'react/jsx-filename-extension': [0],
'react/prefer-stateless-function': [0],
'react/require-default-props': [0],
'react/no-array-index-key': [0],
'jsx-a11y/no-static-element-interactions': [0],
'jsx-a11y/no-marquee': [0],
'jsx-a11y/href-no-hash': [0],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/style-prop-object': [0],
'react/forbid-prop-types': [1],
'react/destructuring-assignment': [0],
'react/no-access-state-in-setstate': [0],
'react/jsx-first-prop-new-line': [2, 'multiline'],
'react/jsx-max-props-per-line': [2, {maximum: 1, when: 'multiline'}],
'react/jsx-one-expression-per-line': [0],
'react/jsx-props-no-spreading': [0],
'react/jsx-wrap-multilines': [
2,
{
assignment: false,
arrow: false,
return: false,
declaration: false,
},
],
'react/jsx-tag-spacing': [
2,
{
closingSlash: 'never',
beforeSelfClosing: 'always',
afterOpening: 'never',
},
],
},
settings: {
react: {
version: 'detect',
},
},
}