.eslintrc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {
  2. "root": true,
  3. "env": {
  4. "node": true,
  5. "jest": true
  6. },
  7. "parser": "@typescript-eslint/parser",
  8. "extends": [
  9. "plugin:@typescript-eslint/recommended-requiring-type-checking",
  10. // TODO: make this work with typescript
  11. // "plugin:node/recommended"
  12. "prettier"
  13. ],
  14. "plugins": ["@typescript-eslint", "node", "security"],
  15. "parserOptions": {
  16. "project": "./tsconfig.json"
  17. },
  18. "globals": {
  19. "__statics": true,
  20. "process": true
  21. },
  22. // add your custom rules here
  23. "rules": {
  24. "no-debugger": "error",
  25. "no-process-exit": "off",
  26. "security/detect-non-literal-fs-filename": "warn",
  27. "security/detect-unsafe-regex": "error",
  28. "security/detect-buffer-noassert": "error",
  29. "security/detect-child-process": "warn",
  30. "security/detect-disable-mustache-escape": "error",
  31. "security/detect-eval-with-expression": "error",
  32. "security/detect-no-csrf-before-method-override": "error",
  33. "security/detect-non-literal-regexp": "error",
  34. "security/detect-non-literal-require": "warn",
  35. "security/detect-object-injection": "warn",
  36. "security/detect-possible-timing-attacks": "error",
  37. "security/detect-pseudoRandomBytes": "error",
  38. "space-before-function-paren": "off",
  39. "@typescript-eslint/default-param-last": "off",
  40. "@typescript-eslint/strict-boolean-expressions": 0,
  41. "no-return-await": "warn",
  42. "@typescript-eslint/return-await": "off"
  43. }
  44. }