-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
55 lines (52 loc) · 1.46 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
const js = require("@eslint/js");
const globals = require("globals");
// https://github.com/facebook/create-react-app/tree/main/packages/confusing-browser-globals
const restrictedGlobals = require("confusing-browser-globals");
module.exports = [
js.configs.recommended,
{
rules: {
"block-scoped-var": "error",
"consistent-return": "error",
"dot-notation": "error",
"eqeqeq": ["error", "smart"],
"no-console": "error",
"no-else-return": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-floating-decimal": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-multi-str": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-restricted-globals": ["error"].concat(restrictedGlobals),
"no-return-assign": "error",
"no-self-compare": "error",
"no-unmodified-loop-condition": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-return": "error",
"no-var": "error",
"no-warning-comments": "warn",
"no-with": "error",
"wrap-iife": ["error", "any"],
"no-shadow-restricted-names": "error",
},
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.browser,
ajaxurl: false,
jQuery: false,
gfdpspxpay_updatev1: false,
module: false,
}
}
}
];