-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.mjs
58 lines (53 loc) · 1.47 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
import presetsNodeTypescriptPrettier from "@cybozu/eslint-config/flat/presets/node-typescript-prettier.js";
import websiteConfig from "./website/eslint.config.mjs";
import featuresConfig from "./features/eslint.config.mjs";
/** @type {import("eslint").Linter.Config[]} */
export default [
{
ignores: [
"**/lib",
"**/dist",
"**/coverage",
"**/allure-report",
"**/allure-results",
// website package
"website/.docusaurus",
"website/build",
// Auto generated file
"website/contributors.json",
],
},
...presetsNodeTypescriptPrettier,
{
rules: {
curly: ["error", "all"],
"func-style": ["error"],
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-wrapper-object-types": "off",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
},
],
"n/no-missing-import": "off",
},
},
...websiteConfig.map((configObject) => ({
files: ["website/**/*.{js,cjs,mjs,ts,cts,mts,jsx,tsx}"],
...configObject,
})),
...featuresConfig.map((configObject) => ({
files: ["features/**/*.{js,cjs,mjs,ts,cts,mts,jsx,tsx}"],
...configObject,
})),
];