-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheslint.config.mjs
More file actions
51 lines (47 loc) · 965 Bytes
/
eslint.config.mjs
File metadata and controls
51 lines (47 loc) · 965 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
41
42
43
44
45
46
47
48
49
50
51
import js from "@eslint/js"
import globals from "globals"
import jestPlugin from "eslint-plugin-jest"
export default [
// Base JS recommended rules
js.configs.recommended,
// Application code
{
files: ["**/*.js"],
ignores: [
"node_modules/**",
"coverage/**",
"dist/**"
],
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs",
globals: {
...globals.node
}
},
rules: {
// Common good defaults
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"no-console": "off",
"no-undef": "error",
"no-var": "error",
"prefer-const": "warn"
}
},
// Jest test files
{
files: ["**/*.test.js", "**/test/**/*.js"],
plugins: {
jest: jestPlugin
},
languageOptions: {
globals: {
...globals.node,
...globals.jest
}
},
rules: {
...jestPlugin.configs.recommended.rules
}
}
]