-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (46 loc) · 1.24 KB
/
Copy patheslint.config.mjs
File metadata and controls
50 lines (46 loc) · 1.24 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
// @ts-check
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import vitestPlugin from "@vitest/eslint-plugin";
import tseslint from "typescript-eslint";
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
reactHooksPlugin.configs.flat["recommended-latest"],
{
rules: {
"no-empty-function": "warn",
"no-nested-ternary": "warn",
"no-unreachable": "warn",
"object-shorthand": "warn",
"linebreak-style": ["warn", "unix"],
eqeqeq: ["warn", "smart"],
"no-console": [
"warn",
{
allow: ["warn", "error", "info"],
},
],
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
destructuredArrayIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
{
files: ["**/*.test.ts", "**/*.test.tsx"],
plugins: {
vitest: vitestPlugin,
},
rules: {
...vitestPlugin.configs.recommended.rules,
},
}
);