-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
111 lines (109 loc) · 2.3 KB
/
.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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
const path = require("path")
const fs = require("fs")
// see https://github.com/import-js/eslint-plugin-import/issues/1174
const packageDirs = ["packages", "plugins", "microservices"]
const packageDir = []
for (const dir of packageDirs) {
for (const d of fs
.readdirSync(path.resolve(__dirname, dir))
.filter(
(entry) =>
entry.slice(0, 1) !== "." &&
fs.lstatSync(path.resolve(__dirname, dir, entry)).isDirectory()
)) {
const p = path.join(dir, d)
packageDir.push(p)
}
}
module.exports = {
settings: {
"import/resolver": {
alias: true,
},
},
extends: [
"airbnb-base",
"prettier",
"plugin:prettier/recommended",
"plugin:import/recommended",
],
plugins: [],
rules: {
"import/no-commonjs": [0],
"import/no-dynamic-require": [0],
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
packageDir,
},
],
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
"parent",
"index",
"sibling",
"object",
],
pathGroups: [
{
group: "internal",
pattern: "~/**",
},
{
group: "internal",
pattern: "~**",
},
],
pathGroupsExcludedImportTypes: [],
},
],
"global-require": [0],
"no-restricted-syntax": [0],
"no-async-promise-executor": [0],
"no-nested-ternary": [0],
"no-loop-func": [0],
"no-new": [0],
"func-names": [0],
"no-plusplus": [0],
"no-param-reassign": [0],
"no-continue": [0],
"no-unused-vars": [
2,
{
vars: "all",
args: "after-used",
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"no-console": [0],
"no-throw-literal": [0],
"no-await-in-loop": [0],
"consistent-return": [0],
semi: ["error", "never"],
"prettier/prettier": [
"error",
{
semi: false,
},
],
},
parserOptions: {
ecmaVersion: "latest",
sourceType: "script",
env: [
{
node: true,
},
],
},
ignorePatterns: ["node_modules"],
}