-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (42 loc) · 968 Bytes
/
eslint.config.js
File metadata and controls
44 lines (42 loc) · 968 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
43
44
const { defineConfig } = require("eslint/config");
const globals = require("globals");
const js = require("@eslint/js");
const react = require("eslint-plugin-react");
const eslintConfigPrettier = require("eslint-config-prettier/flat");
const languageOptions = {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
wp: "readonly",
}
};
module.exports = defineConfig([
{
ignores: ["vendor/", "node_modules/", "*.config.js", "composer.*", "package*.json"],
},
{
settings: {
react: {
version: "18",
}
},
files: ["src/**/*.js", "src/**/*.jsx"],
plugins: { js, react },
extends: [
"js/recommended",
react.configs.flat.recommended,
react.configs.flat["jsx-runtime"]
],
languageOptions,
rules: {
"no-case-declarations": 0,
"react/prop-types": 0,
"react/jsx-no-target-blank": 0,
}
},
eslintConfigPrettier,
]);