-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
33 lines (32 loc) · 1007 Bytes
/
eslint.config.js
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
import js from "@eslint/js"
import globals from "globals"
export default [
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
},
rules: {
// console.log, console.warn, and console.error can be used.
"no-console": "off",
// Always use two spaces, and indent switch-case statements.
indent: [ "error", 2, { SwitchCase: 1 } ],
// Use Unix line endings (\n).
"linebreak-style": [ "error", "unix" ],
// Use double quotes.
quotes: [ "error", "double" ],
"quote-props": [ "error", "as-needed" ],
// Enforce dangling commas for multiline statements
"comma-dangle": [ "error", "always-multiline" ],
// Always require curly braces for all control statements
curly: "error",
// No single-line braces
"brace-style": [ "error", "1tbs", { allowSingleLine: true } ],
// Disallow semicolons
semi: [ "error", "never" ],
},
},
]