-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
55 lines (55 loc) · 1.45 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
// parser: 'babel-eslint',
// parserOptions: {
// sourceType: 'module'
// },
extends: 'style-guide',
env: {
browser: true,
node: true,
mocha: true,
jest: true,
},
globals: {
packAxios: true,
},
settings: {
// https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#settings
'import/resolver': {
node: {
extensions: ['.mjs', '.js', '.json', '.ts']
}
},
'import/extensions': [
'.js',
'.ts',
'.tsx',
'.mjs',
'.jsx',
],
},
rules: {
"wrap-iife": [2, "any"],
// https://eslint.org/docs/rules/arrow-body-style
"arrow-body-style": ["error", "always"],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// This rule warns the usage of `console`
// 不禁用 console
'no-console': 'off',
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 'no-unused-vars': 'off',
'global-require': 'off',
'prefer-destructuring': 'off',
// https://eslint.cn/docs/rules/guard-for-in
'guard-for-in': 'off',
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
"no-unused-vars": "off",
// specify the maximum length of a line in your program
},
};