-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.js
58 lines (57 loc) · 1.5 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
47
48
49
50
51
52
53
54
55
56
57
58
import reactPlugin from "eslint-plugin-react";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import unusedImports from "eslint-plugin-unused-imports";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default [
{
...eslint.configs.recommended,
files: ["src/**/*.{js,jsx,mjs,cjs,ts,tsx}"],
},
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
{
...reactPlugin.configs.flat.recommended,
files: ["src/**/*.{js,jsx,mjs,cjs,ts,tsx}"],
rules: {
"react/prop-types": "off",
},
},
{
files: ["src/**/*.{js,jsx,mjs,cjs,ts,tsx}"],
ignores: ["src/components/ui/**"],
plugins: {
"unused-imports": unusedImports,
},
rules: {
semi: "error",
"prefer-const": "error",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{
allowShortCircuit: true,
allowTernary: true,
},
],
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"@typescript-eslint/no-explicit-any": "off",
"unused-imports/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
];