-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
45 lines (43 loc) · 1.36 KB
/
eslint.config.mjs
File metadata and controls
45 lines (43 loc) · 1.36 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
// ESLint flat-config — replaces the legacy `.eslintrc.json`.
//
// Rules carry over verbatim from the old config so this is purely a
// format migration; the lint result of the suite should be unchanged.
// The flat-config switch unblocks the eslint v8 → v9 bump (flat config
// is the default-and-only format from v9 onward).
//
// Order matters: later configs in the array override earlier ones.
// We stack `eslint:recommended` first, then `typescript-eslint`'s
// recommended preset (parser + plugin + sensible defaults for .ts
// files), then our own per-rule overrides.
import js from "@eslint/js";
import tseslint from "typescript-eslint";
export default [
// Global ignores. Equivalent to `ignorePatterns` in the old config
// plus the v0.2.0 additions (out-test, dist) so the lint walker
// doesn't recurse into generated output.
{
ignores: [
"out/**",
"out-test/**",
"dist/**",
"node_modules/**",
".vscode-test/**",
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "warn",
},
},
];