-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy patheslint.config.mjs
More file actions
92 lines (91 loc) · 2.58 KB
/
Copy patheslint.config.mjs
File metadata and controls
92 lines (91 loc) · 2.58 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import js from "@eslint/js";
import globals from "globals";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import unusedImports from "eslint-plugin-unused-imports";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
"**/dist/**",
"**/.next/**",
"**/node_modules/**",
"**/coverage/**",
"**/pocketbase/migrations/**",
"**/pocketbase/pb_data*/**",
"**/apps/web/public/*.js",
"**/apps/web/src/app/tailwind.generated.css",
"**/packages/api-types/src/openapi.ts",
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
...globals.builtin,
},
parserOptions: {
ecmaFeatures: { jsx: true },
},
},
plugins: {
react,
"react-hooks": reactHooks,
"unused-imports": unusedImports,
},
settings: {
react: { version: "19.2" },
},
rules: {
...react.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-object-type": "warn",
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
"@typescript-eslint/no-wrapper-object-types": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"no-unused-vars": "off",
"no-empty": ["warn", { allowEmptyCatch: true }],
"no-empty-pattern": "warn",
"no-extra-boolean-cast": "warn",
"no-var": "warn",
"no-useless-escape": "warn",
"no-unsafe-finally": "warn",
"prefer-const": "warn",
"@typescript-eslint/prefer-as-const": "warn",
"@typescript-eslint/triple-slash-reference": "warn",
"unused-imports/no-unused-imports": "warn",
"react/no-unescaped-entities": "warn",
"react/jsx-no-target-blank": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
},
},
{
files: ["**/*.{js,cjs,mjs}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.node,
...globals.builtin,
},
},
},
);