Skip to content

Commit 3fe5f7a

Browse files
authored
2.10.21: update npm dependencies (#1474)
1 parent d897ac2 commit 3fe5f7a

35 files changed

+2100
-1652
lines changed

eslint.config.mjs

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
import {fixupConfigRules} from "@eslint/compat";
2+
import globals from "globals";
3+
import tsParser from "@typescript-eslint/parser";
4+
import path from "node:path";
5+
import {fileURLToPath} from "node:url";
6+
import js from "@eslint/js";
7+
import {FlatCompat} from "@eslint/eslintrc";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
});
16+
17+
export default [{
18+
ignores: ["**/node_modules", "**/build"],
19+
}, ...fixupConfigRules(compat.extends(
20+
"eslint:recommended",
21+
"plugin:@typescript-eslint/recommended",
22+
"plugin:import/errors",
23+
"plugin:import/warnings",
24+
"plugin:import/typescript",
25+
)), {
26+
languageOptions: {
27+
globals: {
28+
...globals.browser,
29+
...globals.mocha,
30+
...globals.node,
31+
},
32+
33+
parser: tsParser,
34+
ecmaVersion: 5,
35+
sourceType: "module",
36+
37+
parserOptions: {
38+
project: "tsconfig.eslint.json",
39+
},
40+
},
41+
42+
rules: {
43+
"import/no-unresolved": "off",
44+
"import/namespace": "off",
45+
"import/named": "off",
46+
"semi-spacing": "error",
47+
"space-infix-ops": "error",
48+
"prefer-arrow-callback": "error",
49+
"import/export": "off",
50+
51+
"import/newline-after-import": ["error", {
52+
count: 1,
53+
}],
54+
55+
"object-curly-spacing": "error",
56+
"@typescript-eslint/explicit-function-return-type": "off",
57+
"@typescript-eslint/array-type": "error",
58+
"@typescript-eslint/no-unused-vars": "off",
59+
"no-useless-escape": "off",
60+
"@typescript-eslint/ban-ts-comment": "off",
61+
"@typescript-eslint/ban-types": "off",
62+
"no-undef": "off",
63+
"@typescript-eslint/ban-ts-ignore": "off",
64+
"@typescript-eslint/explicit-module-boundary-types": "off",
65+
"no-control-regex": "off",
66+
"@typescript-eslint/camelcase": "off",
67+
"@typescript-eslint/no-this-alias": "off",
68+
"@typescript-eslint/no-non-null-assertion": "off",
69+
"@typescript-eslint/explicit-member-accessibility": "error",
70+
"@typescript-eslint/consistent-type-assertions": "error",
71+
"@typescript-eslint/interface-name-prefix": "off",
72+
"@typescript-eslint/member-delimiter-style": "off",
73+
"@typescript-eslint/member-ordering": "off",
74+
"@typescript-eslint/no-empty-function": "error",
75+
"@typescript-eslint/no-empty-interface": "error",
76+
"@typescript-eslint/no-explicit-any": "off",
77+
"@typescript-eslint/no-inferrable-types": "off",
78+
"@typescript-eslint/no-require-imports": "error",
79+
"@typescript-eslint/no-use-before-define": "off",
80+
"@typescript-eslint/no-var-requires": "error",
81+
"@typescript-eslint/prefer-for-of": "error",
82+
"@typescript-eslint/prefer-namespace-keyword": "error",
83+
"@typescript-eslint/restrict-plus-operands": "off",
84+
"@typescript-eslint/triple-slash-reference": "error",
85+
"@typescript-eslint/unified-signatures": "error",
86+
camelcase: "off",
87+
"capitalized-comments": ["off", "never"],
88+
"comma-dangle": ["error", "always-multiline"],
89+
"constructor-super": "error",
90+
curly: "error",
91+
"default-case": "error",
92+
"dot-notation": "off",
93+
"eol-last": "off",
94+
eqeqeq: ["error", "smart"],
95+
"guard-for-in": "off",
96+
"id-blacklist": "off",
97+
"id-match": "error",
98+
99+
"max-len": ["error", {
100+
ignoreRegExpLiterals: true,
101+
ignoreStrings: true,
102+
ignorePattern: "^\\s*\\*",
103+
code: 140,
104+
}],
105+
106+
"new-parens": "error",
107+
"no-bitwise": "error",
108+
"no-caller": "error",
109+
"no-cond-assign": "error",
110+
"no-console": "off",
111+
"no-constant-condition": "off",
112+
"no-debugger": "error",
113+
"no-duplicate-case": "error",
114+
"no-empty": "error",
115+
"no-eval": "error",
116+
"no-fallthrough": "error",
117+
"no-invalid-this": "off",
118+
"no-irregular-whitespace": "error",
119+
"no-multiple-empty-lines": "off",
120+
"no-new-wrappers": "off",
121+
"no-redeclare": "error",
122+
"no-return-await": "error",
123+
"no-sequences": "error",
124+
125+
"no-shadow": ["off", {
126+
hoist: "all",
127+
}],
128+
129+
"no-sparse-arrays": "error",
130+
"no-trailing-spaces": "error",
131+
"no-underscore-dangle": "off",
132+
"no-unused-expressions": "off",
133+
"no-unused-labels": "error",
134+
"no-var": "error",
135+
"no-void": "error",
136+
"one-var": ["error", "never"],
137+
"prefer-const": "error",
138+
"@typescript-eslint/prefer-readonly": "error",
139+
radix: "error",
140+
"spaced-comment": "off",
141+
"use-isnan": "error",
142+
},
143+
}];

0 commit comments

Comments
 (0)