-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
31 lines (30 loc) · 877 Bytes
/
Copy patheslint.config.mjs
File metadata and controls
31 lines (30 loc) · 877 Bytes
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
import js from "@eslint/js";
import nextPlugin from "@next/eslint-plugin-next";
import { defineConfig, globalIgnores } from "eslint/config";
import jsxA11yX from "eslint-plugin-jsx-a11y-x";
import reactHooks from "eslint-plugin-react-hooks";
import tseslint from "typescript-eslint";
export default defineConfig([
{
...js.configs.recommended,
files: ["**/*.{js,mjs,cjs}"],
},
...tseslint.configs.recommended,
{
files: ["**/*.{ts,tsx}"],
plugins: {
"@next/next": nextPlugin,
"react-hooks": reactHooks,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
...reactHooks.configs.flat.recommended.rules,
},
},
{
files: ["**/*.{jsx,tsx}"],
...jsxA11yX.configs.recommended,
},
globalIgnores([".next/**", "out/**", "coverage/**", "next-env.d.ts"]),
]);