-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy patheslint.config.cjs
More file actions
59 lines (57 loc) · 1.38 KB
/
eslint.config.cjs
File metadata and controls
59 lines (57 loc) · 1.38 KB
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
const { includeIgnoreFile } = require("@eslint/compat")
const path = require("node:path")
const globals = require("globals")
const js = require("@eslint/js")
const reactPlugin = require("eslint-plugin-react")
const eslintPluginPrettierRecommended = require("eslint-plugin-prettier/recommended")
const babelParser = require("@babel/eslint-parser")
const ignorePath = path.resolve(__dirname, ".prettierignore")
module.exports = [
includeIgnoreFile(ignorePath),
js.configs.recommended,
reactPlugin.configs.flat.recommended,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.jest,
...globals.es2015,
$: "readonly",
getURLParameter: "readonly",
},
parser: babelParser,
},
rules: {
"no-console": "off",
"react/no-find-dom-node": "off",
"react/no-render-return-value": "off",
"react/no-string-refs": "off",
"react/react-in-jsx-scope": "off",
},
settings: {
react: {
version: "detect",
},
},
},
{
files: ["cypress/**/*.js"],
languageOptions: {
globals: {
cy: "readonly",
},
},
},
{
files: ["tests/**/*.js"],
languageOptions: {
globals: {
QUnit: "readonly",
setCookie: "readonly",
getCookie: "readonly",
},
},
},
]