generated from acdh-oeaw/template-app-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
46 lines (43 loc) · 1.38 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
/** @typedef {import("typescript-eslint").Config} Config */
import baseConfig from "@acdh-oeaw/eslint-config";
import nextConfig from "@acdh-oeaw/eslint-config-next";
import playwrightConfig from "@acdh-oeaw/eslint-config-playwright";
import reactConfig from "@acdh-oeaw/eslint-config-react";
import tailwindcssConfig from "@acdh-oeaw/eslint-config-tailwindcss";
import gitignore from "eslint-config-flat-gitignore";
/** @type {Config} */
const config = [
gitignore({ strict: false }),
...baseConfig,
...reactConfig,
...nextConfig,
...tailwindcssConfig,
...playwrightConfig,
{
rules: {
"arrow-body-style": ["error", "always"],
"no-restricted-imports": [
"error",
{
name: "next/link",
message: "Please use @/components/link instead.",
},
{
name: "next/navigation",
importNames: ["redirect", "permanentRedirect", "useRouter", "usePathname"],
message: "Please use @/lib/navigation instead.",
},
{
name: "next/router",
message: "Please use @/lib/navigation instead.",
},
],
"prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
// "@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/require-array-sort-compare": "error",
// "@typescript-eslint/strict-boolean-expressions": "error",
"react/jsx-sort-props": ["error", { reservedFirst: true }],
},
},
];
export default config;