-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
38 lines (37 loc) · 967 Bytes
/
.eslintrc.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
const path = require("path");
const baseRules = require("eslint-config-airbnb-base/rules/style");
const [_, ...restricted] = baseRules.rules["no-restricted-syntax"];
module.exports = {
extends: "airbnb-base",
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 2017,
sourceType: "module",
},
env: {
node: true,
browser: true,
},
plugins: ["babel", "import", "compat"],
rules: {
"arrow-parens": ["error", "as-needed"],
"no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
"linebreak-style": 0,
"no-restricted-syntax": [
2,
...restricted.filter(r => !["ForOfStatement"].includes(r.selector)),
],
"global-require": 0,
"object-curly-newline": 0,
"implicit-arrow-linebreak": 0,
"import/no-unresolved": [2, { commonjs: true }],
quotes: 0,
},
settings: {
"import/resolver": {
node: {
paths: [path.join(__dirname), "node_modules"],
},
},
},
};