-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
63 lines (62 loc) · 2.12 KB
/
eslint.config.js
File metadata and controls
63 lines (62 loc) · 2.12 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
53
54
55
56
57
58
59
60
61
62
63
import js from "@eslint/js";
import nodePlugin from "eslint-plugin-n";
export default [
js.configs.recommended,
nodePlugin.configs["flat/recommended-module"],
{
"rules": {
"no-console": 0,
"no-useless-escape": "warn",
"arrow-parens": [ "error", "always" ],
"n/no-process-exit": "warn",
"n/hashbang": "warn",
"no-var": "error",
"prefer-const": "error",
"array-bracket-spacing": [ "error", "never" ],
"comma-dangle": [ "error", "never" ],
"computed-property-spacing": [ "error", "never" ],
"eol-last": "error",
"eqeqeq": [ "error", "smart" ],
"indent": [ "error", 4, { "SwitchCase": 1 } ],
"no-confusing-arrow": [ "error", { "allowParens": false } ],
"no-extend-native": "error",
"no-mixed-spaces-and-tabs": "error",
"func-call-spacing": [ "error", "never" ],
"no-trailing-spaces": "error",
"no-unused-vars": "error",
"no-use-before-define": [ "error", "nofunc" ],
"object-curly-spacing": [ "error", "always" ],
"prefer-arrow-callback": "error",
"quotes": [ "error", "single", "avoid-escape" ],
"semi": [ "error", "always" ],
"space-infix-ops": "error",
"spaced-comment": [ "error", "always" ],
"keyword-spacing": [ "error", { "before": true, "after": true } ],
"template-curly-spacing": [ "error", "never" ],
"semi-spacing": "error",
"strict": "error"
}
},
{
files: ["src/**/*.js"],
languageOptions: {
sourceType: "commonjs",
globals: {
exports: "writable",
module: "readonly",
require: "readonly"
}
},
rules: {
"n/no-extraneous-require": "off",
"no-undef": "off",
"strict": "off"
}
},
{
files: ["tests/**/*.js"],
rules: {
"n/no-unpublished-import": "off"
}
}
];