-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy patheslint.config.js
More file actions
80 lines (77 loc) · 2.14 KB
/
eslint.config.js
File metadata and controls
80 lines (77 loc) · 2.14 KB
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
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import noOnlyTestPlugin from "eslint-plugin-no-only-tests";
import globals from "globals";
import parser from "@typescript-eslint/parser";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import customLintRules from "./custom-lint-rules/index.js";
const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
recommendedConfig: js.configs.recommended,
});
const config = [
...compat.extends("plugin:@typescript-eslint/recommended"),
{
plugins: {
"@typescript-eslint": typescriptEslint,
"no-only-tests": noOnlyTestPlugin,
"custom-lint-rules": customLintRules,
},
},
{
// name?
files: ["**/*.ts", "**/*.js", "**/translation.json"],
languageOptions: {
parser: parser,
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.node,
},
},
rules: {
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-console": "error",
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
{
allowArgumentsExplicitlyTypedAsAny: true,
},
],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-imports": "error",
"padding-line-between-statements": [
"error",
{ blankLine: "any", prev: "*", next: "*" },
],
"no-only-tests/no-only-tests": "error",
"custom-lint-rules/no-res-locals-write": "error",
},
linterOptions: {
reportUnusedDisableDirectives: true,
},
settings: {
// Additional settings can be added here if necessary
},
},
{
ignores: [
"scripts/**",
"src/assets/**",
"eslint.config.js",
"*.d.ts",
"node_modules",
"dist",
"functional-output",
"coverage",
"src/assets/javascript",
"journey-map",
".venv/**",
"playwright-acceptance-tests/reports/**",
],
},
];
export default config;