-
Notifications
You must be signed in to change notification settings - Fork 61
/
.eslintrc
140 lines (140 loc) · 3.79 KB
/
.eslintrc
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"root": true,
"env": {
"browser": true,
"es6": true,
"jasmine": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"comment": true,
"project": [
"./tsconfig.json",
"./src/webview/tsconfig.json"
],
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"prettier",
"header",
"import",
"jsdoc"
],
"settings": {
"import/core-modules": [ "vscode" ],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {},
"node": {
"extensions": [
".js",
".jsx",
".tsx",
".ts"
]
}
},
"import/extensions": [
".js",
".jsx",
".tsx",
".ts"
]
},
"rules": {
"header/header": [2, "./header.js"],
"camelcase": 2,
"consistent-return": 0,
"consistent-this": [1, "that"],
"curly": ["error", "multi-line"],
"default-case": [2],
"dot-notation": [2],
"no-multiple-empty-lines": [1, { "max": 1, "maxEOF": 0 }],
"eqeqeq": [2, "allow-null"],
"guard-for-in": 2,
"import/no-unresolved": ["error"],
"import/no-duplicates": ["error"],
"import/prefer-default-export": 0,
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"max-nested-callbacks": [1, 4],
"max-classes-per-file": [0],
"no-alert": 2,
"no-caller": 2,
"no-console": 2,
"no-constant-condition": 2,
"no-debugger": 2,
"no-else-return": ["error"],
"no-global-strict": 0,
"no-irregular-whitespace": ["error"],
"no-param-reassign": ["error", { "props": false }],
"no-shadow": 1,
"no-underscore-dangle": 0,
"no-useless-constructor": "off",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/unbound-method": ["error", { "ignoreStatic": true }],
"@typescript-eslint/restrict-template-expressions": 1,
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-unsafe-return": 1,
"@typescript-eslint/no-unsafe-member-access": 1,
"@typescript-eslint/no-unsafe-call": 1,
"@typescript-eslint/no-unsafe-assignment": 1,
"@typescript-eslint/no-var-requires": 1,
"@typescript-eslint/no-unsafe-argument": 1,
"@typescript-eslint/no-unused-expressions": 0,
"no-var": 2,
"object-shorthand": ["error", "properties"],
"prefer-const": ["error", { "destructuring": "all" }],
"prefer-template": 2,
"radix": 2,
"no-trailing-spaces": "error",
"@typescript-eslint/prefer-regexp-exec": 0,
"quotes": [ "error", "single"],
"@typescript-eslint/no-unused-vars": [ "error", { "vars": "local", "args": "none" }],
"@typescript-eslint/no-explicit-any": 1,
"jsdoc/check-tag-names": "error",
"jsdoc/check-param-names": ["error", { "checkDestructured": false }],
"jsdoc/check-alignment": "error",
"jsdoc/no-multi-asterisks": "error",
"jsdoc/no-types": "error",
"jsdoc/require-param-name": "error",
"jsdoc/require-returns-check": "error",
"jsdoc/require-returns-description": "error",
},
"overrides": [
{
"files": ["*.test.ts"],
"rules": {
"no-unused-expressions": "off",
"@typescript-eslint/unbound-method" : "off",
"max-nested-callbacks" : "off",
"@typescript-eslint/no-unsafe-assignment": 1
}
},
{
"files": ["./src/@types/**.d.ts"],
"rules": {
"header/header": "off"
}
}
]
}