-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
48 lines (43 loc) · 1.28 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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import {fixupPluginRules} from '@eslint/compat';
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import nextPlugin from '@next/eslint-plugin-next';
const nextConfig = {
plugins: {
'@next/next': nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs['core-web-vitals'].rules,
},
};
export default [
{settings: {
"react": {
"version": "detect"
}
}
},
{files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"]},
{languageOptions: {parserOptions: {ecmaFeatures: {jsx: true}}, globals: {...globals.commonjs}}}, // ...globals.browser,
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReactConfig,
{
plugins: {
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
},
},
{
rules: {
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
"@typescript-eslint/no-explicit-any": "off",
...eslintPluginReactHooks.configs.recommended.rules,
}
},
nextConfig,
];