-
Notifications
You must be signed in to change notification settings - Fork 66
/
eslint.config.mjs
44 lines (43 loc) · 1.17 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
import commonjs from "@peggyjs/eslint-config/commonjs.js";
import compat from "eslint-plugin-compat";
import mocha from "@peggyjs/eslint-config/mocha.js";
import { modern } from "@peggyjs/eslint-config/modern.js";
import ts from "@peggyjs/eslint-config/ts.js";
export default [
{
ignores: [
"benchmark/**",
"build/**",
"examples/*.js", // Testing examples
"test/cli/fixtures/bad.js", // Intentionally-invalid
"test/cli/fixtures/imports_peggy.js", // Generated
"test/cli/fixtures/lib.js", // Generated
"test/cli/fixtures/useFrags/fs.js", // Generated
"test/cli/fixtures/useFrags/identifier.js", // Generated
"lib/parser.js", // Generated
"lib/parser.d.ts", // Generated
"bin/generated_template.d.ts", // Generated
],
},
...commonjs,
...mocha,
...ts,
{
...modern,
// All of these can use modern JS and node constructs
files: ["bin/*.js", "tools/**", "web-test/**", "src/*.mjs"],
},
{
// Check these files for broad browser compatibility.
files: [
"**/*.min.js",
"lib/parser.js",
],
plugins: {
compat,
},
rules: {
"compat/compat": "error",
},
},
];