-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
56 lines (55 loc) · 1.15 KB
/
eslint.config.mjs
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
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import unicorn from "eslint-plugin-unicorn";
import globals from "globals";
import tseslint from "typescript-eslint";
import jest from "eslint-plugin-jest";
export default [
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
},
js.configs.recommended,
...tseslint.configs.recommended,
unicorn.configs["flat/recommended"],
prettier,
{
languageOptions: {
parserOptions: {
ecmaFeatures: { jsx: true },
},
},
settings: {
react: { version: "detect" },
},
files: ["**/*.{tsx,ts}"],
plugins: {
"react-hooks": reactHooks,
react,
},
rules: {
...reactHooks.configs.recommended.rules,
...react.configs.recommended.rules,
"react/react-in-jsx-scope": "off",
},
},
{
files: ["*.test.ts*"],
plugins: {
jest,
},
rules: {
...jest.configs.recommended.rules,
},
},
{
rules: {
"unicorn/prefer-top-level-await": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/numeric-separators-style": "off",
},
},
];