-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
79 lines (77 loc) · 2.02 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
import js from "@eslint/js";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import neostandard from "neostandard";
import tsEslint from "typescript-eslint";
import tsEslintParser from "@typescript-eslint/parser";
import globals from "globals";
import tsEslintPlugin from "@typescript-eslint/eslint-plugin";
import stylistic from "@stylistic/eslint-plugin";
const neostandardConfig = neostandard({ semi: true, noStyle: true });
export default [
...neostandardConfig,
js.configs.recommended,
...tsEslint.configs.recommended,
eslintPluginPrettierRecommended,
{
languageOptions: {
ecmaVersion: 7,
sourceType: "module",
globals: {
...globals.commonjs,
...globals.node,
msCrypto: true,
},
parser: tsEslintParser,
},
},
{
plugins: {
"typescript-eslint": tsEslintPlugin,
"@stylistic": stylistic,
},
},
{
rules: {
"@stylistic/indent": ["error", 2],
"@stylistic/no-trailing-spaces": "error",
"no-var": "error",
"no-multi-str": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
ignoreRestSiblings: true,
},
],
"@typescript-eslint/no-unsafe-function-type": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"lines-between-class-members": [
"error",
"always",
{
exceptAfterSingleLine: true,
},
],
"prefer-promise-reject-errors": [
"error",
{
allowEmptyReject: true,
},
],
camelcase: "off",
"comma-dangle": "off",
curly: "off",
"jsx-quotes": "off",
"key-spacing": "off",
"no-console": "off",
quotes: "off",
"space-before-function-paren": "off",
"n/no-callback-literal": "off",
},
},
{
ignores: ["node_modules/*", "dist/*"],
},
];