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
|
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import stylistic from "@stylistic/eslint-plugin"
export default tseslint.config(
{ ignores: ["dist/", "spectre.js"] },
eslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ["*.js"],
},
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
"@stylistic": stylistic,
},
rules: {
"@stylistic/semi": ["error", "never"],
"@stylistic/quotes": [
"error",
"double",
{ allowTemplateLiterals: true /*"avoidEscape"*/ },
],
"@stylistic/brace-style": ["error", "1tbs", { allowSingleLine: true }],
"@stylistic/indent": ["error", 4],
curly: ["error", "multi-line"],
eqeqeq: "error",
"no-var": "error",
"prefer-const": "error",
"no-constant-binary-expression": "error",
"no-self-compare": "error",
},
},
)
|