-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
104 lines (104 loc) · 2.88 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
98
99
100
101
102
103
104
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"eslint-plugin-import",
"eslint-plugin-no-only-tests",
"@typescript-eslint"
],
"env": {
"browser": true
},
"rules": {
"import/extensions": ["error", "always"],
"no-prototype-builtins": "off",
"no-only-tests/no-only-tests": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
],
// Enforces that when a module is imported, that module is listed in the
// package's immediate "dependencies". Note internal-only files are excluded
// in an "overrides" configuration below.
"import/no-extraneous-dependencies": [
"error",
{
// These modules are also allowed to import from their immediate
// "devDependencies".
"devDependencies": [
// This package has a type-only import of "react", but it's not a
// dependency.
"packages/labs/react/**"
]
}
]
},
"overrides": [
{
"files": [
"check-version-tracker.js",
"rollup-common.js",
"rollup.config.js",
"web-test-runner.config.js"
],
"env": {
"node": true
}
},
{
"files": ["packages/lit-html/src/test/version-stability_test.js"],
"env": {
"mocha": true
}
},
{
"files": [
"*_test.ts",
"packages/labs/ssr/custom_typings/node.d.ts",
"packages/labs/ssr/src/test/integration/tests/**",
"packages/labs/ssr/src/lib/util/parse5-utils.ts"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
},
{
// Files listed here don't need to declare their imports in their
// immediate package.json "dependencies". This should include all
// internal-only files, like tests, which are allowed to import from
// "devDependencies", and also from packages declared only in the root
// monorepo "package.json".
"files": [
"**/goldens/**",
"**/rollup.config.js",
"**/src/test-gen/**",
"**/src/test/**",
"**/src/tests/**",
"**/test-output/**",
"**/web-test-runner.config.js",
"packages/benchmarks/**",
"packages/labs/ssr/src/demo/**",
"packages/tests/**",
"rollup-common.js"
],
"rules": {
"import/no-extraneous-dependencies": "off"
}
}
]
}