-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy patheslint.config.mjs
32 lines (30 loc) · 1 KB
/
eslint.config.mjs
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
// @ts-check
import tseslint from "typescript-eslint";
import prettierConfig from "eslint-config-prettier";
export default tseslint.config(
tseslint.configs.stylisticTypeChecked,
tseslint.configs.strictTypeChecked,
prettierConfig,
{
rules: {
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/switch-exhaustiveness-check": ["error", { considerDefaultExhaustiveForUnions: true }],
eqeqeq: "error",
"no-throw-literal": "off",
"@typescript-eslint/only-throw-error": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-duplicate-imports": "error",
"sort-imports": ["error", { allowSeparatedGroups: true }],
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
ignores: ["**/*.js", "**/*.mjs"],
},
);