.eslintrc.cjs 846 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. module.exports = {
  2. env: {
  3. commonjs: true,
  4. es2021: true,
  5. node: true,
  6. jest: true
  7. },
  8. parserOptions: {
  9. ecmaVersion: "latest"
  10. },
  11. parser: "@typescript-eslint/parser",
  12. extends: [
  13. "eslint:recommended"
  14. ],
  15. rules: {
  16. curly: [1, "all"],
  17. // disallow single quotes
  18. quotes: [1, "double", { allowTemplateLiterals: true }],
  19. // force semi-colons
  20. semi: 1,
  21. // allow tabs
  22. "no-tabs": [0],
  23. // use tab indentation
  24. indent: [1, "tab", {
  25. SwitchCase: 1
  26. }],
  27. // prevent commar dangles
  28. "comma-dangle": [1, "never"],
  29. // allow paren-less arrow functions
  30. "arrow-parens": 0,
  31. // allow async-await
  32. "generator-star-spacing": 0,
  33. "no-unused-vars": [0, { args: "after-used", vars: "local" }],
  34. "no-constant-condition": 0,
  35. // allow debugger during development
  36. "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0
  37. }
  38. };