-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
34 lines (29 loc) · 1.13 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
import pluginJs from "@eslint/js";
import configPrettier from "eslint-config-prettier";
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginTypescript from "typescript-eslint";
/** @type {import('eslint').Linter.Config[]} */
export default [
{ ignores: ["dist/", "**/*.{js,mjs,cjs}"] },
pluginJs.configs.recommended,
...pluginTypescript.configs.recommendedTypeChecked,
{ languageOptions: { parserOptions: { projectService: true } } },
pluginReact.configs.flat.recommended,
pluginReact.configs.flat["jsx-runtime"],
{ settings: { react: { version: "detect" } } },
{ plugins: { "react-hooks": pluginReactHooks } },
configPrettier,
{
rules: {
"no-console": "error",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"@typescript-eslint/unbound-method": "off",
},
},
];