-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
54 lines (53 loc) · 1.24 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
import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import prettier from "eslint-plugin-prettier";
import reactPlugin from "eslint-plugin-react";
import globals from "globals";
// eslint.config.js
export default [
js.configs.recommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat["jsx-runtime"],
{
...reactPlugin.configs.flat.recommended,
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
...reactPlugin.configs.flat.recommended.languageOptions,
globals: {
...globals.browser,
...globals.node,
...globals.es2022,
...globals.jest,
},
},
settings: { react: { version: "detect" } },
plugins: {
react: reactPlugin,
prettier,
},
files: ["**/*.{js,mjs,cjs,jsx,ts,tsx}"],
rules: {
...eslintConfigPrettier.rules,
...reactPlugin.configs["jsx-runtime"].rules,
"react/prop-types": "off",
},
},
{
ignores: [
"build/*",
".firebase",
".github/*",
".vscode/*",
"data/*",
"dist/*",
"forklift/*",
"maps/*",
"mockups/*",
"node_modules/*",
"package-lock.json",
"public/*",
"scripts/*",
],
},
];