-
-
Notifications
You must be signed in to change notification settings - Fork 264
Expand file tree
/
Copy patheslint.config.mjs
More file actions
52 lines (50 loc) · 1.21 KB
/
Copy patheslint.config.mjs
File metadata and controls
52 lines (50 loc) · 1.21 KB
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
/**
* ESLint flat config: @eslint/js recommended + minimal project overrides.
*/
import { defineConfig } from "eslint/config";
import js from "@eslint/js";
import globals from "globals";
const ECMA_VERSION = 2022;
export default defineConfig([
{
ignores: [
"**/node_modules/**",
"**/coverage/**",
"**/.nyc_output/**",
"**/docs/**",
"**/modbus-serial/**"
]
},
js.configs.recommended,
{
files: ["**/*.js"],
languageOptions: {
ecmaVersion: ECMA_VERSION,
globals: globals.node,
sourceType: "commonjs"
}
},
{
files: ["**/*.mjs"],
languageOptions: {
ecmaVersion: ECMA_VERSION,
globals: globals.nodeBuiltin,
sourceType: "module"
}
},
{
files: ["test/**/*.js"],
languageOptions: {
globals: {
...globals.node,
...globals.mocha
}
}
},
{
rules: {
// Allow unused catch bindings (e.g. try { require(...) } catch (err) {})
"no-unused-vars": ["error", { caughtErrors: "none" }]
}
}
]);