-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
62 lines (59 loc) · 1.77 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"use strict";
const globals = require("globals");
const js = require("@eslint/js");
const nodePlugin = require("eslint-plugin-n");
const jestPlugin = require("eslint-plugin-jest");
const configPrettier = require("eslint-config-prettier");
// https://eslint.org/docs/latest/use/configure/configuration-files
// https://eslint.org/docs/rules/
module.exports = [
{
ignores: ["**/node_modules/", "**/temp/", "**/reports/"],
},
js.configs.recommended,
nodePlugin.configs["flat/recommended-script"],
jestPlugin.configs["flat/recommended"],
configPrettier,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs",
globals: {
...globals.node,
window: false,
socket: false,
sap: false,
cds: false,
SELECT: false,
INSERT: false,
UPDATE: false,
UPSERT: false,
DELETE: false,
CREATE: false,
DROP: false,
STREAM: false,
},
},
rules: {
strict: ["error"],
curly: ["error"],
"no-unused-vars": ["error", { argsIgnorePattern: "err|req|res|next", caughtErrors: "none" }],
"no-restricted-modules": ["off"],
"no-eval": ["error"],
"no-implied-eval": ["error"],
"no-console": ["error"],
"no-throw-literal": ["error"],
"no-control-regex": ["off"],
"no-constant-binary-expression": ["off"],
"prefer-promise-reject-errors": ["error"],
"no-constant-condition": ["error", { checkLoops: false }],
"no-var": ["error"],
"n/no-extraneous-require": ["off"],
"n/no-unpublished-require": ["off"],
"n/no-unsupported-features/node-builtins": ["off"],
"n/no-deprecated-api": ["off"],
"jest/no-conditional-expect": ["off"],
"jest/no-disabled-tests": ["off"],
},
},
];