forked from Trymunx/moonshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (53 loc) · 1.71 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
module.exports = {
env: {
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
],
parser: "@typescript-eslint/parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
plugins: [
"@typescript-eslint",
"eslint-plugin-import",
"sort-keys-fix",
"typescript-sort-keys",
],
root: true,
rules: {
"arrow-parens": ["warn", "as-needed"],
"comma-dangle": ["error", "always-multiline"],
"generator-star-spacing": ["error", { after: true, before: false }],
indent: ["error", 2, { SwitchCase: 1 }],
"linebreak-style": ["error", "unix"],
"max-len": ["error", { code: 100, ignoreTrailingComments: true, tabWidth: 2 }],
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-fallthrough": ["error", { commentPattern: "break[\\s\\w]*omitted" }],
"no-trailing-spaces": ["error"],
"object-curly-spacing": ["warn", "always", { arraysInObjects: false, objectsInObjects: false }],
quotes: ["error", "double"],
semi: ["error", "always"],
"sort-imports": [
"warn",
{
ignoreCase: true,
memberSyntaxSortOrder: ["none", "all", "single", "multiple"],
},
],
"sort-keys": ["warn", "asc", { caseSensitive: true, natural: true }],
"sort-keys-fix/sort-keys-fix": "warn",
"space-before-function-paren": [
"error",
{ anonymous: "never", asyncArrow: "never", named: "never" },
],
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error",
},
};