-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.mjs
More file actions
43 lines (41 loc) · 1.07 KB
/
Copy patheslint.config.mjs
File metadata and controls
43 lines (41 loc) · 1.07 KB
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
import pluginNext from "@next/eslint-plugin-next";
import pluginReactHooks from "eslint-plugin-react-hooks";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
const eslintConfig = [
{
ignores: [
"src/_pages_old/**",
"src/components/**/*.js",
"src/templates/**",
"src/hooks/**",
"src/gatsby-plugin-theme-ui/**",
"gatsby/**",
],
},
{
files: ["**/*.{ts,tsx}"],
plugins: {
"@typescript-eslint": tseslint,
"@next/next": pluginNext,
"react-hooks": pluginReactHooks,
},
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: { jsx: true },
},
},
rules: {
...pluginNext.configs.recommended.rules,
...pluginNext.configs["core-web-vitals"].rules,
...pluginReactHooks.configs.recommended.rules,
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
},
},
];
export default eslintConfig;