-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
75 lines (70 loc) · 1.72 KB
/
.eslintrc.cjs
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
require("@html-validate/eslint-config/patch/modern-module-resolution");
module.exports = {
root: true,
extends: ["@html-validate"],
rules: {
"import/extensions": "off",
"security/detect-unsafe-regex": "off",
},
overrides: [
{
/* ensure cjs and mjs files are linted too */
files: ["*.cjs", "*.mjs"],
},
{
files: ["docs/*.js"],
rules: {
/* docs scripts are expected to log to console */
"no-console": "off",
},
},
{
files: "*.ts",
extends: ["@html-validate/typescript"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
},
},
{
files: ["docs/examples/**/*.[jt]s"],
rules: {
"@typescript-eslint/no-var-requires": "off",
"eslint-comments/require-description": "off",
"import/no-duplicates": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"n/no-extraneous-import": ["error", { allowModules: ["html-validate"] }],
"tsdoc/syntax": "off",
"no-console": "off",
},
},
{
files: ["src/**/*.ts"],
excludedFiles: ["src/**/*.spec.ts"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
extends: ["@html-validate/typescript-typeinfo"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
},
},
{
files: "*.spec.[jt]s",
excludedFiles: ["cypress/**", "tests/e2e/**"],
extends: ["@html-validate/jest"],
},
{
/* files which should lint even if project isn't build yet */
files: ["./*.d.ts", "bin/*.js"],
rules: {
"import/export": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
},
},
],
};