|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + |
| 4 | + env: { |
| 5 | + node: true, |
| 6 | + jest: true, |
| 7 | + }, |
| 8 | + |
| 9 | + parser: "@typescript-eslint/parser", |
| 10 | + |
| 11 | + extends: [ |
| 12 | + "standard-with-typescript", |
| 13 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 14 | + "plugin:lodash-template/recommended", |
| 15 | + // TODO: make this work with typescript |
| 16 | + // 'plugin:node/recommended' |
| 17 | + "prettier", |
| 18 | + "prettier/@typescript-eslint", |
| 19 | + ], |
| 20 | + |
| 21 | + plugins: ["@typescript-eslint", "node", "security"], |
| 22 | + |
| 23 | + parserOptions: { |
| 24 | + tsconfigRootDir: __dirname, |
| 25 | + project: "./tsconfig.json", |
| 26 | + }, |
| 27 | + |
| 28 | + globals: { |
| 29 | + __statics: true, |
| 30 | + process: true, |
| 31 | + }, |
| 32 | + |
| 33 | + // add your custom rules here |
| 34 | + rules: { |
| 35 | + // allow console.log during development only |
| 36 | + "no-console": process.env.NODE_ENV === "production" ? "error" : "off", |
| 37 | + // allow debugger during development only |
| 38 | + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", |
| 39 | + "no-process-exit": "off", |
| 40 | + "security/detect-non-literal-fs-filename": "warn", |
| 41 | + "security/detect-unsafe-regex": "error", |
| 42 | + "security/detect-buffer-noassert": "error", |
| 43 | + "security/detect-child-process": "warn", |
| 44 | + "security/detect-disable-mustache-escape": "error", |
| 45 | + "security/detect-eval-with-expression": "error", |
| 46 | + "security/detect-no-csrf-before-method-override": "error", |
| 47 | + "security/detect-non-literal-regexp": "error", |
| 48 | + "security/detect-non-literal-require": "warn", |
| 49 | + "security/detect-object-injection": "warn", |
| 50 | + "security/detect-possible-timing-attacks": "error", |
| 51 | + "security/detect-pseudoRandomBytes": "error", |
| 52 | + "space-before-function-paren": "off", |
| 53 | + "@typescript-eslint/default-param-last": "off", |
| 54 | + "@typescript-eslint/strict-boolean-expressions": 0, |
| 55 | + }, |
| 56 | +}; |
0 commit comments