-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
33 lines (32 loc) · 1.03 KB
/
Copy patheslint.config.ts
File metadata and controls
33 lines (32 loc) · 1.03 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
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";
export default defineConfig([
globalIgnores(["dist/**", "node_modules/**", "src/public/**", "vendor/**", "web/**"]),
js.configs.recommended,
...tseslint.configs.recommended,
// tsc (via vtsls + tsconfig's strict + noUnusedLocals/Params) already
// reports the type-aware and unused-symbol diagnostics that
// typescript-eslint's recommended set would otherwise duplicate. Strip
// the type-aware rules, and also turn off no-unused-vars since tsc's
// noUnusedLocals/noUnusedParameters cover it without a second diagnostic.
tseslint.configs.disableTypeChecked,
{
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
{
files: ["src/**/*.{js,ts}"],
languageOptions: {
globals: globals.browser,
},
},
{
files: ["*.{js,cjs,mjs,mts,ts}", "config/**/*.{js,ts}"],
languageOptions: {
globals: globals.node,
},
},
]);