generated from dmarchuk/react-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
81 lines (79 loc) · 2.93 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
module.exports = {
env: {
browser: true,
es6: true,
jest: true
},
extends: [
'airbnb-base',
'plugin:react/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
tsconfigRootDir: process.cwd(),
},
plugins: [
'@typescript-eslint',
"jest"
],
rules: {
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'arrow-parens': ['error', 'as-needed'],
'comma-dangle': ['error', 'always-multiline'],
'consistent-return': ['off'],
curly: ['error', 'all'],
'function-paren-newline': ['off'],
indent: ['error', 4],
'linebreak-style': ['off'],
'lines-between-class-members': ['off'],
'max-len': ['error', 180],
'no-alert': ['error'],
'no-cond-assign': ['error', 'except-parens'],
'no-constant-condition': ['error'],
'no-console': ['error'],
'no-mixed-operators': ['off'],
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1, maxBOF: 0 }],
'no-param-reassign': ['error', { props: false }],
'no-plusplus': ['off'],
'no-return-assign': ['error', 'except-parens'],
'no-restricted-syntax': ['off'],
'no-use-before-define': ['off'],
'no-unused-vars': 'off',
'no-var': ['off'],
'object-curly-newline': ['error', { multiline: true, consistent: true }],
'operator-linebreak': ['error', 'after', { overrides: { '?': 'ignore', ':': 'ignore' } }],
'prefer-destructuring': ['error', { object: true, array: false }],
'prefer-template': ['off'],
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'vars-on-top': ['off'],
'import/default': ['off'],
'import/extensions': ['off'],
'import/first': ['off'],
'import/order': ['error', { 'newlines-between': 'ignore' }],
'import/named': ['off'],
'import/no-unresolved': ['off'],
'import/prefer-default-export': ['off'],
'react/jsx-curly-brace-presence': ['error', 'never'],
'react/jsx-curly-spacing': ['error', 'never'],
'react/jsx-handler-names': ['error', { eventHandlerPrefix: 'handle', eventHandlerPropPrefix: 'on' }],
'react/jsx-no-bind': ['error', { ignoreRefs: true }],
'react/jsx-uses-react': 1,
'react/no-danger': ['off'],
'react/no-direct-mutation-state': ['error'],
'react/no-typos': ['off'],
'react/no-unused-state': ['error'],
'react/prefer-es6-class': ['error', 'always'],
'react/prefer-stateless-function': ['off'],
'react/require-default-props': ['off'],
'react/sort-comp': ['off'],
},
};