forked from smdoh/pipebird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
52 lines (50 loc) · 1.32 KB
/
.eslintrc.cjs
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
const { builtinModules } = require("module");
const ALLOWED_NODE_BUILTINS = new Set(["assert"]);
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
project: "tsconfig.json",
},
plugins: ["@typescript-eslint", "deprecation"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
"no-console": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-unused-expressions": "error",
"prefer-const": "error",
"@typescript-eslint/no-floating-promises": "error",
"deprecation/deprecation": "warn",
"object-shorthand": ["error", "always"],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
overrides: [
{
files: [
"lib/temporal/workflows.ts",
"lib/temporal/workflows-*.ts",
"lib/temporal/workflows/*.ts",
],
rules: {
"no-restricted-imports": [
"error",
...builtinModules
.filter((m) => !ALLOWED_NODE_BUILTINS.has(m))
.flatMap((m) => [m, `node:${m}`]),
],
},
},
],
ignorePatterns: [".eslintrc.cjs", "tests/*"],
};