-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
62 lines (62 loc) · 1.58 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
module.exports = {
root: true, // 作用的目录是根目录
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
overrides: [
{
// https://stackoverflow.com/questions/58510287/parseroptions-project-has-been-set-for-typescript-eslint-parser
files: ['*.ts', '*.tsx'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
sourceType: 'module',
},
},
],
rules: {
'prettier/prettier': [
'error',
{
trailingComma: 'all',
singleQuote: true,
usePrettierrc: false,
},
],
'linebreak-style': [0, 'error', 'windows'],
'no-new': 0,
'no-debugger': 2,
'no-console': ['error', { allow: ['warn'] }],
'spaced-comment': 0,
'vue/attribute-hyphenation': 0,
'vue/html-self-closing': 0,
'no-param-reassign': 0,
'prefer-destructuring': 0,
semi: 0,
'import/extensions': 0,
'no-plusplus': 0,
radix: 0,
'arrow-body-style': 0,
'class-methods-use-this': 0,
'func-names': 0,
'import/no-unresolved': 0,
'no-unused-expressions': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-types': 0,
},
env: {
browser: true,
es6: true,
},
globals: {
document: true,
localStorage: true,
window: true,
jQuery: true,
$: true,
workbox: true,
importScripts: true,
},
};