-
Notifications
You must be signed in to change notification settings - Fork 10
/
eslint.config.js
75 lines (72 loc) · 2.17 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
63
64
65
66
67
68
69
70
71
72
73
74
75
"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");
// const typescriptPlugin = require("typescript-eslint");
// https://eslint.org/docs/latest/use/configure/configuration-files
// https://eslint.org/docs/rules/
module.exports = [
{
ignores: ["**/node_modules/", "**/reports/", "**/temp/", "**/test/", "**/test-hana/", "**/test-postgres/"],
},
js.configs.recommended,
nodePlugin.configs["flat/recommended-script"],
jestPlugin.configs["flat/recommended"],
configPrettier,
/*...typescriptPlugin.configs["recommended"].map((config) => {
return {
files: ["*.ts"],
...config,
};
}),*/
{
languageOptions: {
ecmaVersion: 2024,
sourceType: "commonjs",
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
globals: {
...globals.node,
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": ["off"],
"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"],
"no-inner-declarations": ["off"],
"prefer-promise-reject-errors": ["error"],
"no-constant-condition": ["error", { checkLoops: false }],
"no-var": ["error"],
"no-prototype-builtins": ["off"],
"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"],
"@typescript-eslint/no-unused-vars": ["off"],
"@typescript-eslint/no-var-requires": ["off"],
},
},
];