-
Notifications
You must be signed in to change notification settings - Fork 27
/
eslint.config.js
43 lines (37 loc) · 1.38 KB
/
eslint.config.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
const { FlatCompat } = require("@eslint/eslintrc");
const typescriptEslint = require("typescript-eslint");
const typescriptEslintPlugin = require("@typescript-eslint/eslint-plugin");
const typescriptEslintParser = require("@typescript-eslint/parser");
const globals = require("globals");
const js = require("@eslint/js");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended
});
module.exports = typescriptEslint.config(
{
ignores: [
"**/dist/",
"**/migrations/*",
"packages/create/templates/"
]
},
{
files: ["**/*.ts"],
extends: compat.extends("plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-type-checked"),
plugins: { "@typescript-eslint": typescriptEslintPlugin },
languageOptions: {
parser: typescriptEslintParser,
parserOptions: { project: "./tsconfig.json" },
globals: { ...globals.node }
},
rules: {
"eqeqeq": "error",
"@typescript-eslint/indent": "off",
"@typescript-eslint/unbound-method": ["error", { ignoreStatic: true }],
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_", caughtErrors: "none" }],
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
"@typescript-eslint/no-floating-promises": "error"
}
}
);