|
1 |
| -module.exports = { |
2 |
| - ignores: ["node_modules/", "reports/", "test/"], |
3 |
| -}; |
| 1 | +"use strict"; |
| 2 | + |
| 3 | +const globals = require("globals"); |
| 4 | +const js = require("@eslint/js"); |
| 5 | + |
| 6 | +const nodePlugin = require("eslint-plugin-n"); |
| 7 | +const jestPlugin = require("eslint-plugin-jest"); |
| 8 | +const configPrettier = require("eslint-config-prettier"); |
| 9 | + |
| 10 | +// https://eslint.org/docs/latest/use/configure/configuration-files |
| 11 | +// https://eslint.org/docs/rules/ |
| 12 | +module.exports = [ |
| 13 | + { |
| 14 | + ignores: ["**/node_modules/", "**/temp/", "**/reports/"], |
| 15 | + }, |
| 16 | + js.configs.recommended, |
| 17 | + nodePlugin.configs["flat/recommended-script"], |
| 18 | + jestPlugin.configs["flat/recommended"], |
| 19 | + configPrettier, |
| 20 | + { |
| 21 | + languageOptions: { |
| 22 | + ecmaVersion: 2022, |
| 23 | + sourceType: "commonjs", |
| 24 | + globals: { |
| 25 | + ...globals.node, |
| 26 | + window: false, |
| 27 | + socket: false, |
| 28 | + sap: false, |
| 29 | + cds: false, |
| 30 | + SELECT: false, |
| 31 | + INSERT: false, |
| 32 | + UPDATE: false, |
| 33 | + UPSERT: false, |
| 34 | + DELETE: false, |
| 35 | + CREATE: false, |
| 36 | + DROP: false, |
| 37 | + STREAM: false, |
| 38 | + }, |
| 39 | + }, |
| 40 | + rules: { |
| 41 | + strict: ["error"], |
| 42 | + curly: ["error"], |
| 43 | + "no-unused-vars": ["off"], |
| 44 | + "no-restricted-modules": ["off"], |
| 45 | + "no-eval": ["error"], |
| 46 | + "no-implied-eval": ["error"], |
| 47 | + "no-console": ["error"], |
| 48 | + "no-throw-literal": ["error"], |
| 49 | + "no-control-regex": ["off"], |
| 50 | + "no-constant-binary-expression": ["off"], |
| 51 | + "prefer-promise-reject-errors": ["error"], |
| 52 | + "no-constant-condition": ["error", { checkLoops: false }], |
| 53 | + "no-var": ["error"], |
| 54 | + "n/no-extraneous-require": ["off"], |
| 55 | + "n/no-unpublished-require": ["off"], |
| 56 | + "n/no-unsupported-features/node-builtins": ["off"], |
| 57 | + "n/no-deprecated-api": ["off"], |
| 58 | + "jest/no-conditional-expect": ["off"], |
| 59 | + "jest/no-disabled-tests": ["off"], |
| 60 | + }, |
| 61 | + }, |
| 62 | +]; |
0 commit comments