-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patheslint.config.mjs
More file actions
42 lines (41 loc) · 901 Bytes
/
eslint.config.mjs
File metadata and controls
42 lines (41 loc) · 901 Bytes
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
import babelParser from "@babel/eslint-parser";
import js from "@eslint/js";
import globals from "globals";
import reactPlugin from "eslint-plugin-react";
export default [
{
ignores: ["public/**"],
},
js.configs.recommended,
{
files: ["src/**/*.mjs", "client/**/*.jsx", "tests/**/*.js"],
languageOptions: {
parser: babelParser,
parserOptions: {
babelOptions: {
presets: ["@babel/preset-react"],
},
ecmaVersion: 2018,
requireConfigFile: false,
sourceType: "module",
},
globals: {
...globals.browser,
...globals.node,
},
},
plugins: {
react: reactPlugin,
},
settings: {
react: {
version: "detect",
},
},
rules: {
...reactPlugin.configs.recommended.rules,
"no-console": "off",
"react/prop-types": "off",
},
},
];