This repository has been archived by the owner on Sep 18, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
72 lines (72 loc) · 1.94 KB
/
.eslintrc.cjs
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
61
62
63
64
65
66
67
68
69
70
71
72
module.exports = {
parserOptions: { sourceType: "module" },
extends: [
"foxkit/strict",
"foxkit/react",
"foxkit/ts-strict",
"next",
"prettier"
],
rules: { "@next/next/no-img-element": "off" },
overrides: [
{
files: ["tests/server/**/*.test.js", "tests/client/**/*.test.js?(x)"],
env: { jest: true }
},
{
files: ["**/*.ts?(x)"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: __dirname
},
rules: {
"@typescript-eslint/no-explicit-any": "off"
}
},
{
files: ["**/*.mjs", "**/*.js?(x)", "**/*.ts?(x)"],
plugins: ["simple-import-sort"],
extends: ["plugin:import/recommended", "plugin:import/typescript"],
rules: {
"sort-imports": "off",
"simple-import-sort/imports": [
"warn",
{
groups: [
[
// Side effect imports.
"^\\u0000",
"^\\u0000.+\\.css$"
],
[
// node built-ins
`^(${require("module").builtinModules.join("|")})(/|$)`,
// external packages (types last)
"^react",
"^@?\\w",
"\\w\\u0000",
// internal packages
"^~",
"^~\\/.*\\u0000$",
// Parent imports. Put `..` last.
"^\\.\\.\\/",
"^\\.\\.\\/.*\u0000$",
// Same-folder imports and `.` last.
"^\\.\\/",
"^\\.\\/.*\u0000$",
// Style imports.
"^.+\\.module\\.css$"
]
]
}
],
"import/order": "off",
"import/first": "warn",
"import/newline-after-import": "warn",
"import/no-unresolved": "off"
}
}
]
};