-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
56 lines (54 loc) · 1.29 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
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import reactPlugin from "eslint-plugin-react";
import prettierPlugin from "eslint-plugin-prettier";
const compat = new FlatCompat();
export default [
{ignores: [
"**/storybook-static/**",
"**/*.css",
"**/*.json",
"**/*.d.ts",
"**/dist/*",
"**/*.html",
"**/*.svg",
"**/*.md",
"babel.config.js",
"eslint.config.js",
"jest.config.js",
"rollup.config.mjs",
]},
js.configs.recommended,
...compat.extends("plugin:@typescript-eslint/recommended"),
...compat.extends("plugin:react/recommended"),
...compat.extends("prettier"),
{
languageOptions: {
parser: tsParser,
parserOptions: {
project: "tsconfig.eslint.json"
},
},
plugins: {
"@typescript-eslint": tsPlugin,
prettier: prettierPlugin,
react: reactPlugin,
},
rules: {
"react/react-in-jsx-scope": "off",
"no-console": "off",
"prettier/prettier": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
},
settings: {
react: {
version: "18",
},
},
},
];