-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
81 lines (81 loc) · 1.92 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,
node: true,
mocha: true
},
overrides: [
{
files: ['src/**/*.ts', 'src/**/*.d.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint'
],
rules: {
'@typescript-eslint/camelcase': [
'error',
{
allow: ['env_id', 'env_type', 'last_modified'],
ignoreDestructuring: true
}
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-explicit-any': 'off'
}
},
{
files: ['src/**/*.js'],
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
extends: [
'airbnb',
'plugin:react/recommended',
'prettier',
'prettier/react'
],
rules: {
'class-methods-use-this': 'off',
'import/no-cycle': 'off',
'no-control-regex': 'off',
'react/forbid-prop-types': ['error', { forbid: ['any', 'array'] }],
'react/jsx-filename-extension': [
'error',
{ extensions: ['.js', '.jsx'] }
],
'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }],
'react/sort-comp': 'off'
}
},
{
files: ['test/**/*.ts'],
parserOptions: {
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'mocha'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:mocha/recommended',
'prettier',
'prettier/@typescript-eslint'
],
rules: {
'mocha/no-setup-in-describe': 'off'
}
}
],
settings: {
'import/resolver': 'webpack'
}
};