-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
70 lines (67 loc) · 2.81 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
module.exports = {
root : true,
parser : '@typescript-eslint/parser',
parserOptions : {
ecmaVersion: 7,
project : [ './tsconfig.json' ]
},
plugins : [
'eslint-plugin-import',
'eslint-plugin-react',
'eslint-plugin-react-hooks',
'@typescript-eslint/eslint-plugin'
],
extends : [
'airbnb-typescript',
'plugin:react-hooks/recommended'
],
settings : {
react: {
version: 'detect'
}
},
ignorePatterns: [ '**/*.js' ],
rules : {
// Base Rules
'array-bracket-spacing' : [ 'error', 'always' ],
'arrow-body-style' : [ 'off' ],
'arrow-parens' : [ 'off' ],
'consistent-return' : [ 'off' ],
'key-spacing' : [ 'off' ],
'import/no-cycle' : [ 'off' ],
'import/no-extraneous-dependencies': [ 'off' ],
'import/prefer-default-export' : [ 'off' ],
'max-len' : [ 'error', { code: 130, ignoreUrls: true, ignoreStrings: true } ],
'no-case-declarations' : [ 'off' ],
'no-multiple-empty-lines' : [ 'error', { max: 2, maxEOF: 0 } ],
'no-nested-ternary' : [ 'off' ],
'no-param-reassign' : [ 'error', { props: false } ],
'no-useless-escape' : [ 'off' ],
'object-curly-newline' : [ 'error', { consistent: true } ],
'padded-blocks' : [ 'off' ],
'prefer-promise-reject-errors' : [ 'off' ],
// Strict Typescript file Rules
'@typescript-eslint/brace-style' : [ 'error', 'stroustrup' ],
'@typescript-eslint/comma-dangle' : [ 'off' ],
'@typescript-eslint/indent' : [ 'error', 2 ],
'@typescript-eslint/naming-convention': [ 'off' ],
'@typescript-eslint/no-throw-literal' : [ 'off' ],
// JSX a11n
'jsx-a11y/no-noninteractive-element-interactions': [ 'off' ],
'jsx-a11y/click-events-have-key-events' : [ 'off' ],
// Strict React file Rules
'react/default-props-match-prop-types': [ 'off' ],
'react/destructuring-assignment' : [ 'off' ],
'react/jsx-boolean-value' : [ 'off' ],
'react/jsx-curly-brace-presence' : [ 'error', { props: 'always', children: 'never' } ],
'react/jsx-fragments' : [ 'error', 'element' ],
'react/jsx-one-expression-per-line' : [ 'off' ],
'react/jsx-props-no-spreading' : [ 'off' ],
'react/no-array-index-key' : [ 'off' ],
'react/no-unused-prop-types' : [ 'off' ],
'react/prop-types' : [ 'off' ],
'react/require-default-props' : [ 'off' ],
'react/state-in-constructor' : [ 'error', 'never' ],
'react/static-property-placement' : [ 'off' ]
}
};