Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
60 lines (58 loc) · 1.64 KB
/
Copy patheslint.config.mjs
File metadata and controls
60 lines (58 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 eslint from "@eslint/js";
import importPlugin from "eslint-plugin-import";
import importHelpersPlugin from "eslint-plugin-import-helpers";
import commentLengthPlugin from "eslint-plugin-comment-length";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
"docs/**",
"**/node_modules/",
"**/pnpm-lock.yaml",
"__tests__/**",
"dist/**",
".wireit/**",
"scripts/**",
"worker-configuration.d.ts",
"eslint.config.mjs",
"vitest.config.ts",
"prettier.config.js",
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
importPlugin.flatConfigs.recommended,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
"import-helpers": importHelpersPlugin,
"comment-length": commentLengthPlugin,
},
rules: {
"@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
"@typescript-eslint/consistent-type-exports": [
"error",
{ fixMixedExportsWithInlineTypeSpecifier: true },
],
"import/no-unresolved": "off",
"import-helpers/order-imports": [
"warn",
{
newlinesBetween: "always",
groups: ["module", ["parent", "sibling", "index"]],
alphabetize: {
order: "asc",
ignoreCase: true,
},
},
],
"comment-length/limit-single-line-comments": ["warn", { maxLength: 100 }],
"comment-length/limit-multi-line-comments": ["warn", { maxLength: 100 }],
},
}
);