-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
57 lines (56 loc) · 1.57 KB
/
eslint.config.js
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
import globals from "globals";
import js from "@eslint/js";
import ts from "typescript-eslint";
import unicorn from "eslint-plugin-unicorn";
import n from "eslint-plugin-n";
import prettier from "eslint-config-prettier";
export default ts.config(
js.configs.recommended,
...ts.configs.recommendedTypeChecked,
...ts.configs.strictTypeChecked,
unicorn.configs["flat/recommended"],
n.configs["flat/recommended-module"],
prettier,
{
languageOptions: {
sourceType: "module",
ecmaVersion: "latest",
globals: {
...globals.es2021,
...globals.node,
},
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
"@typescript-eslint/array-type": ["error", { default: "array-simple" }],
"@typescript-eslint/consistent-type-imports": [
"error",
{ fixStyle: "inline-type-imports" },
],
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-unused-vars": "off",
complexity: ["error", 7],
"no-constant-condition": "off",
"n/no-missing-import": "off",
"n/shebang": "off",
"prefer-const": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/prefer-spread": "off",
"unicorn/prefer-ternary": "off",
"unicorn/prevent-abbreviations": "off",
},
},
{
files: ["**/*.js", "**/*.cjs", "**/*.mjs"],
...ts.configs.disableTypeChecked,
},
{
ignores: ["node_modules/", "dist/", "coverage/"],
},
);