-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Copy patheslint.config.js
40 lines (40 loc) · 1.06 KB
/
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
34
35
36
37
38
39
40
const js = require("@eslint/js");
const babelParser = require("@babel/eslint-parser");
const globals = require("globals");
module.exports = [
{
ignores: ["**/lib/**", "**/coverage/**", "**/out/**"],
},
js.configs.recommended,
{
languageOptions: {
parser: babelParser,
ecmaVersion: 6,
sourceType: "module",
globals: {
Parse: "readonly",
...globals.node,
},
parserOptions: {
requireConfigFile: false,
},
},
rules: {
indent: ["error", 2, { SwitchCase: 1 }],
"linebreak-style": ["error", "unix"],
"no-trailing-spaces": "error",
"eol-last": "error",
"space-in-parens": ["error", "never"],
"no-multiple-empty-lines": "warn",
"prefer-const": "error",
"space-infix-ops": "error",
"no-useless-escape": "off",
"require-atomic-updates": "off",
"object-curly-spacing": ["error", "always"],
curly: ["error", "all"],
"block-spacing": ["error", "always"],
"no-unused-vars": "off",
"no-console": "warn"
},
},
];