-
Notifications
You must be signed in to change notification settings - Fork 610
/
eslint.config.mjs
55 lines (50 loc) · 1.08 KB
/
eslint.config.mjs
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
/* eslint-env node */
"use strict";
import globals from "globals";
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const mozillaRecommended = require("eslint-plugin-mozilla");
const noUnsanitized = require("eslint-plugin-no-unsanitized");
export default [
{
languageOptions: {
parserOptions: {
ecmaVersion: "latest",
},
globals: {
...globals.node,
},
},
files: ["**/*.js"],
plugins: {
mozilla: mozillaRecommended,
"no-unsanitized": noUnsanitized,
},
rules: {
// Can't use everything because this isn't flat-config ready.
...mozillaRecommended.configs.recommended.rules,
"no-inner-declarations": 2,
"no-shadow": 2,
"no-unused-vars": [
2,
{
vars: "all",
args: "none",
},
],
},
},
{
files: ["test/**/*.js"],
languageOptions: {
globals: {
it: "readonly",
describe: "readonly",
before: "readonly",
},
},
rules: {
"no-console": 0,
},
},
];