-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
101 lines (99 loc) · 2.59 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
96
97
98
99
100
101
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'prettier',
],
overrides: [
// general JS
{
files: ['*.js'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': ['error', { args: 'after-used', varsIgnorePattern: '_' }],
},
},
// unit tests
{
files: ['test/**/*.js'],
env: {
mocha: true,
node: true,
},
},
// build config files
{
files: ['*.config.js', '.eslintrc.js'],
env: {
node: true,
},
},
],
globals: {
ENV: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
env: {
browser: true,
es6: true,
amd: true,
},
settings: {
'react': {
version: '16.8',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.gql'],
},
'import/resolver': {
node: {
paths: ['src'],
},
},
},
plugins: ['@typescript-eslint'],
rules: {
'semi': 'off',
'indent': 'off',
'arrow-body-style': 'off',
'object-curly-newline': 'off',
'max-len': 'off',
'camelcase': 'off',
'new-cap': 'off',
'arrow-parens': 'off',
'no-param-reassign': 'off',
'no-continue': 'off',
'no-loop-func': 'off',
'import/order': 'off',
'class-methods-use-this': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/control-has-associated-label': 'off',
'no-plusplus': 'off',
'no-underscore-dangle': 'off',
'prefer-template': 'off',
'react/forbit-prop-types': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-closing-bracket-location': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/no-danger': 'off',
'react/prefer-stateless-function': 'off',
'react/destructuring-assignment': 'off',
'react/prop-types': 'off',
'react/sort-comp': 'off',
'react/state-in-constructor': 'off',
'react/no-find-dom-node': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
}