.eslintrc.cjs 595 B

123456789101112131415161718192021222324
  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: ['eslint:recommended'],
  13. rules: {
  14. curly: [1, 'all'],
  15. // allow paren-less arrow functions
  16. 'arrow-parens': 0,
  17. // allow async-await
  18. 'generator-star-spacing': 0,
  19. 'no-unused-vars': [0, { args: 'after-used', vars: 'local' }],
  20. 'no-constant-condition': 0,
  21. // allow debugger during development
  22. 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  23. },
  24. }