-
Notifications
You must be signed in to change notification settings - Fork 369
/
eslint.config.js
64 lines (63 loc) · 2.09 KB
/
eslint.config.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
63
64
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
export default [
{
files: ["**/*.{js,mjs,cjs,ts}"],
},
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.strict,
{
ignores: ["*.config.js", "coverage/**/**"],
},
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: [
"test/project-setups/javascript-*/*.{js,mjs,cjs,ts}",
],
},
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
"no-unused-vars": "off",
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-confusing-void-expression": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-redundant-type-constituents": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
},
},
{
files: ["test/**/*.{js,mjs,cjs,ts}"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
},
{
files: ["test/project-setups/**/*.{js,mjs,cjs,ts}"],
rules: {
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
},
},
];