-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
74 lines (72 loc) · 1.61 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import eslint from "@eslint/js";
import prettier from "eslint-config-prettier";
import jsxA11y from "eslint-plugin-jsx-a11y";
import playwright from "eslint-plugin-playwright";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import globals from "globals";
import typescriptEslint from "typescript-eslint";
export default [
{
name: "ignore",
ignores: ["graphql/", "build/", "playwright-report/"],
},
{
name: "eslint/recommended:",
...eslint.configs.recommended,
},
...typescriptEslint.configs.recommended,
{
name: "react/recommended",
...react.configs.flat.recommended,
settings: {
react: {
version: "18",
},
},
},
{
name: "react/jsx",
...react.configs.flat["jsx-runtime"],
},
{
name: "react/hooks",
plugins: { "react-hooks": reactHooks },
},
{
name: "jsx-a11y/recommended",
...jsxA11y.flatConfigs.recommended,
},
{
name: "playwright/recommended",
...playwright.configs["flat/recommended"],
files: ["tests/playwright/**"],
rules: {
...playwright.configs["flat/recommended"].rules,
},
},
{
name: "simple-import-sort/recommended",
plugins: {
"simple-import-sort": simpleImportSort,
},
rules: {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
},
},
{
name: "prettier",
...prettier,
},
{
name: "globals",
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
];