-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (39 loc) · 978 Bytes
/
Copy patheslint.config.js
File metadata and controls
40 lines (39 loc) · 978 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
import js from "@eslint/js";
import globals from "globals";
/**
* ESLint flat config for browser ES modules (no bundler).
* Educational note: `languageOptions.globals` tells ESLint that `document`,
* `window`, etc. exist at runtime in the browser.
*
* Second block: Node globals for this config file and `scripts/*.mjs` (fs, path, process).
*/
export default [
js.configs.recommended,
{
ignores: ["node_modules/**", "dist/**"],
},
{
files: ["js/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
},
},
rules: {
"no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
},
},
{
files: ["eslint.config.js", "scripts/**/*.mjs"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: { ...globals.node },
},
},
];