-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
44 lines (44 loc) · 1.18 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020
},
env: {
es6: true,
jest: true,
// 如果不需要,可以卸载 eslint-plugin-node 和 eslint-plugin-promise 依赖
// 如果是NodeJs项目建议在 package.json 中开启 engine 的限制
node: true,
browser: true,
mocha: true,
jasmine: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
plugins: ['@typescript-eslint'],
rules: {
// 'jsx-quotes': ['error', 'prefer-double']
'@typescript-eslint/explicit-module-boundary-types': 'off'
}
// overrides: [
// {
// files: ['config/*.js'],
// rules: {
// 'import/no-commonjs': 'off',
// }
// }
// ],
// settings: {
// react: {
// pragma: 'React',
// // React version. 'detect' automatically picks the version you have installed.
// // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// // default to latest and warns if missing
// // It will default to 'detect' in the future
// version: 'detect',
// }
// }
}