-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patheslint.config.js
More file actions
48 lines (45 loc) · 1.47 KB
/
Copy patheslint.config.js
File metadata and controls
48 lines (45 loc) · 1.47 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
import js from "@eslint/js";
import globals from "globals";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [
js.configs.recommended,
{
ignores: [
"dist/",
"node_modules/",
"**/*.d.ts",
"src/components/monaco/chuck-lang.ts",
"src/components/editor/monaco/chuck-lang.ts"
]
},
{
files: ["**/*.ts", "**/*.js"],
plugins: {
"@typescript-eslint": tsPlugin
},
languageOptions: {
parser: tsParser,
globals: {
...globals.browser,
...globals.es2021
}
},
rules: {
// --- Formatting (match .prettierrc.json) ---
"indent": ["error", 4, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
"semi": ["error", "always"],
"comma-dangle": ["error", "never"],
// --- TypeScript: disable base rules that TS handles better ---
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
// --- Other disabled rules ---
"no-useless-assignment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-expressions": "off"
}
}
];