-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
Copy patheslint.config.mjs
50 lines (44 loc) · 970 Bytes
/
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
import globals from "globals";
import js from "@eslint/js";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default [
{
ignores: [
// TODO: Use eslint on js lib and generated code
// Ignore lib/js for now, which uses jshint currently
"lib/js/*",
// Ignore all generated code for now
"**/gen-*/",
// Don't lint nested node_modules
"**/node_modules/",
],
},
js.configs.recommended,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
},
ecmaVersion: 2022,
sourceType: "commonjs",
},
rules: {
"no-console": "off",
"no-var": "error",
"prefer-const": "error",
"no-constant-condition": [
"error",
{
checkLoops: false,
},
],
},
},
{
files: ["**/*.mjs"],
languageOptions: {
sourceType: "module",
},
},
];