-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.mjs
More file actions
51 lines (50 loc) · 1.8 KB
/
eslint.config.mjs
File metadata and controls
51 lines (50 loc) · 1.8 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
import stylistic from "@stylistic/eslint-plugin";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
export default [
{
files: ["**/*.ts"], // Target TypeScript files
languageOptions: {
parser: tsParser,
parserOptions: {
project: "./tsconfig.eslint.json",
tsconfigRootDir: process.cwd(),
warnOnUnsupportedTypeScriptVersion: false,
},
},
plugins: {
"@typescript-eslint": tseslint,
"@stylistic": stylistic,
},
rules: {
curly: ["warn", "multi-line"],
"prefer-arrow-callback": "warn",
"prefer-template": "warn",
yoda: ["error", "never", { onlyEquality: true }],
eqeqeq: "error",
"@stylistic/arrow-parens": ["warn", "as-needed"],
"@stylistic/brace-style": ["warn", "1tbs", { allowSingleLine: true }],
"@stylistic/indent": ["warn", 4, { SwitchCase: 1 }],
"@stylistic/linebreak-style": [
"warn",
process.platform === "win32" ? "windows" : "unix",
],
"@stylistic/quotes": ["warn", "double", { avoidEscape: true }],
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
"@typescript-eslint/no-unused-vars": [
"error",
{ vars: "all", args: "none" },
],
// Disabled rules (for clarity)
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/consistent-type-definitions": "off",
},
},
{
ignores: [
"eslint.config.mjs",
"dist/**/*",
"node_modules/**/*",
],
},
];