-
Notifications
You must be signed in to change notification settings - Fork 34
/
.eslintrc.js
40 lines (40 loc) · 1.43 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
/** @type {import('eslint').Linter.Config} */
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: { project: "./tsconfig.json" },
settings: { "import/resolver": "typescript" },
plugins: ["deprecation"],
extends: [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:node/recommended",
"plugin:prettier/recommended",
"plugin:eslint-comments/recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"no-console": "error",
"node/no-missing-import": "off",
"deprecation/deprecation": "warn",
"node/no-unpublished-import": "off",
"@typescript-eslint/no-shadow": "error",
"eslint-comments/no-unused-disable": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-floating-promises": "error",
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }],
"node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules", "dynamicImport"] }],
},
overrides: [
{ files: ["scripts/**/*"], rules: { "no-console": "off" } },
{
files: ["test/**/*"],
extends: ["plugin:mocha/recommended", "plugin:chai-expect/recommended", "plugin:chai-friendly/recommended"],
rules: {
"mocha/no-mocha-arrows": "off",
"mocha/no-exclusive-tests": "error",
},
},
],
};