-
-
Notifications
You must be signed in to change notification settings - Fork 439
/
.eslintrc.js
96 lines (95 loc) · 2.09 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
/* eslint-env node */
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'security-node',
'promise',
'import',
'node',
'n',
'you-dont-need-lodash-underscore',
'no-inferred-method-name',
'json',
'babel',
'import',
'filenames',
'optimize-regex',
'html',
'ascii',
'react',
'jsx-a11y',
'react-perf',
'jest',
'jest-dom',
'prettier',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'standard',
'plugin:node/recommended',
'plugin:import/typescript',
'plugin:promise/recommended',
'plugin:security-node/recommended',
'plugin:jest-dom/recommended',
'plugin:you-dont-need-lodash-underscore/compatible',
// Always last
'prettier',
],
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'no-useless-return': 'off',
'node/no-missing-import': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false }],
'security-node/detect-crlf': 'off',
},
settings: {
ecmascript: 6,
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
// use <root>/path/to/folder/tsconfig.json
typescript: {
directory: './tsconfig.json',
},
},
react: {
version: 'detect',
},
jest: {
version: 27,
},
},
globals: {
__DEV__: false,
__PROD__: false,
__PLAYER_DEBUG__: false,
__BASENAME__: false,
google: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
useJSXTextNode: true,
project: './tsconfig.json',
tsconfigRootDir: './',
},
env: {
"jest/globals": true,
browser: true,
es6: true,
},
}