-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
59 lines (58 loc) · 2.09 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import eslint from "@eslint/js";
import { config, configs } from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import tsParser from "@typescript-eslint/parser";
export default config(
eslint.configs.recommended,
configs.strictTypeChecked,
configs.stylisticTypeChecked,
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
{
ignores: [".wrangler/", "coverage/", "dist/", "patches/", "test-results/", "**/*.json"],
},
{
languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
projectService: {
allowDefaultProject: ["*.mjs"],
defaultProject: "tsconfig.json",
},
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
tsconfigRootDir: import.meta.dirname,
},
},
settings: {
"import/resolver": {
typescript: true,
node: true,
},
},
rules: {
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"default-param-last": "off",
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"no-loop-func": "off",
"@typescript-eslint/no-loop-func": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-empty-export": "error",
"prefer-destructuring": "off",
"@typescript-eslint/prefer-destructuring": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"import/order": "error",
},
},
);