-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.js
40 lines (39 loc) · 1.11 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
const globals = require('globals')
const js = require("@eslint/js")
module.exports = [
js.configs.recommended,
// "global" ignores must be alone in a config object
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
{ignores: ["**/*.min.js"]},
// client-side js for the website
{
files: ["libraries/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.browser,
angular: 'readonly',
jQuery: 'readonly',
$: 'readonly',
},
sourceType: "script"
},
name: "wagtail browser js",
rules: {
indent: [ 'warn', 4 ],
'linebreak-style': [ 'error', 'unix' ],
}
},
// scripts run via node
{
files: ["eslint.config.js", "gulpfile.js"],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.commonjs,
},
sourceType: "commonjs"
},
name: "repo node js",
},
]