-
-
Notifications
You must be signed in to change notification settings - Fork 172
/
eslint.config.mjs
86 lines (81 loc) · 2.45 KB
/
eslint.config.mjs
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
/* eslint-disable n/no-unpublished-import */
import js from "@eslint/js";
import eslintPluginN from "eslint-plugin-n";
import eslintPluginStylistic from "@stylistic/eslint-plugin";
import eslintPluginUnicorn from "eslint-plugin-unicorn";
export default [
js.configs.all,
eslintPluginN.configs["flat/recommended"],
eslintPluginStylistic.configs.customize({
"arrowParens": true,
"braceStyle": "1tbs",
"commaDangle": "never",
"indent": "tab",
"jsx": false,
"quoteProps": "always",
"quotes": "double",
"semi": true
}),
eslintPluginUnicorn.configs["flat/all"],
{
"languageOptions": {
"sourceType": "commonjs"
},
"linterOptions": {
"reportUnusedDisableDirectives": true
},
"rules": {
"array-bracket-spacing": [ "error", "always" ],
"dot-location": [ "error", "property" ],
"func-style": [ "error", "declaration" ],
"function-call-argument-newline": [ "error", "consistent" ],
"function-paren-newline": [ "error", "consistent" ],
"global-require": "off",
"indent": [ "error", "tab" ],
"linebreak-style": "off",
"max-classes-per-file": "off",
"max-depth": [ "error", 6 ],
"max-len": [ "error", 130 ],
"max-lines": "off",
"max-lines-per-function": "off",
"max-statements": "off",
"multiline-comment-style": [ "error", "separate-lines" ],
"no-extra-parens": "off",
"no-magic-numbers": "off",
"no-plusplus": "off",
"no-promise-executor-return": "off",
"no-sync": "off",
"no-tabs": "off",
"no-ternary": "off",
"no-undefined": "off",
"no-use-before-define": [ "error", { "functions": false } ],
"one-var": "off",
"operator-linebreak": [ "error", "after" ],
"padded-blocks": "off",
"prefer-destructuring": "off",
"prefer-named-capture-group": "off",
"prefer-template": "off",
"require-unicode-regexp": "off",
"sort-imports": "off",
"sort-keys": "off",
"n/no-missing-require": [ "error", { "allowModules": [ "vscode" ] } ],
"@stylistic/array-bracket-spacing": [ "error", "always" ],
"@stylistic/indent": [ "error", "tab", { "ObjectExpression": "first" } ],
"@stylistic/operator-linebreak": [ "error", "after" ],
"@stylistic/space-before-function-paren": [ "error", "always" ],
"unicorn/no-array-push-push": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-null": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-string-replace-all": "off"
}
},
{
"files": [
"**/*.mjs"
],
"languageOptions": {
"sourceType": "module"
}
}
];