-
Notifications
You must be signed in to change notification settings - Fork 78
/
.eslintrc.json
97 lines (97 loc) · 2.67 KB
/
.eslintrc.json
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
{
"extends": [
"eslint:recommended",
"plugin:json/recommended-with-comments",
"plugin:import/recommended",
"plugin:lit/recommended",
"plugin:promise/recommended",
"plugin:mocha/recommended",
"prettier"
],
"env": {
"browser": true,
"webextensions": true
},
"plugins": ["import", "eslint-plugin-tsdoc", "sort-imports-es6-autofix"],
"ignorePatterns": ["dist"],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
}
},
"rules": {
"import/no-unresolved": ["error", { "ignore": ["csv-parse/sync"] }],
"block-scoped-var": "error",
"eqeqeq": "error",
"no-var": "error",
"prefer-const": "error",
"eol-last": "error",
"no-trailing-spaces": "error",
"quotes": ["warn", "single", { "avoidEscape": true }],
"linebreak-style": ["error", "unix"],
"no-tabs": "error",
"sort-imports-es6-autofix/sort-imports-es6": "error",
"unicode-bom": "error",
"promise/prefer-await-to-then": "error",
"curly": "error",
"mocha/prefer-arrow-callback": "error"
},
"overrides": [
{
"files": ["**/*.ts"],
"extends": [
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
// TODO(#792): Remove/evaluate following rules once errors are fixed.
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"import/no-named-as-default-member": "off",
"@typescript-eslint/no-non-null-assertion": "off",
// End of rules to fix.
"@typescript-eslint/no-empty-function": [
"error",
{ "allow": ["private-constructors"] }
],
"tsdoc/syntax": "error"
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
},
{
// Enumeration of node scripts and configs.
"files": [
"web-test-runner.config.js",
"utils/*",
"snowpack.config.cjs",
"commitlint.config.cjs",
".prettierrc.cjs"
],
"env": {
"node": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".cjs", ".ts"]
}
}
},
"extends": ["plugin:node/recommended"],
"rules": {
"node/no-unpublished-import": "off"
}
}
]
}