-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (49 loc) · 1.64 KB
/
Copy patheslint.config.js
File metadata and controls
60 lines (49 loc) · 1.64 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
52
53
54
55
56
57
58
59
60
import js from "@eslint/js"
import ts from "typescript-eslint"
import prettier from "eslint-plugin-prettier/recommended"
import imports from "eslint-plugin-import-x"
/** @type {import('typescript-eslint').Config} */
const config = [
{ ignores: ["dist", "coverage"] },
{ ignores: ["eslint.config.js", "vitest.config.ts", "rollup.config.js"] },
js.configs.recommended,
...ts.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname },
},
},
imports.flatConfigs.recommended,
imports.flatConfigs.typescript,
prettier,
{
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-promise-reject-errors": "off",
"sort-imports": ["warn", { allowSeparatedGroups: true, ignoreDeclarationSort: true }],
"import-x/no-default-export": "error",
"import-x/no-duplicates": ["error", { "prefer-inline": true }],
"import-x/newline-after-import": "error",
"import-x/order": [
"error",
{
"newlines-between": "always",
"groups": ["builtin", "external", "internal", "parent", "sibling"],
"pathGroups": [
{ pattern: "effector", group: "external", position: "before" },
{ pattern: "vitest", group: "builtin", position: "after" },
],
"pathGroupsExcludedImportTypes": [],
"alphabetize": { order: "asc", orderImportKind: "desc", caseInsensitive: true },
},
],
},
},
{
files: ["**/*.test.ts"],
rules: {
"@typescript-eslint/require-await": "off",
},
},
]
export default config