.eslintrc.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. module.exports = {
  2. root: true,
  3. parser: '@typescript-eslint/parser',
  4. extends: ['plugin:node/recommended'/*, 'plugin:prettier/recommended'*/],
  5. parserOptions: {
  6. ecmaVersion: 2018,
  7. sourceType: 'module',
  8. },
  9. settings: {
  10. node: {
  11. tryExtensions: ['.js', '.json', '.ts', '.d.ts'],
  12. },
  13. },
  14. rules: {
  15. // 'no-process-exit': 'off', // to investigate if we should throw an error instead of process.exit()
  16. // 'node/no-unsupported-features/es-builtins': 'off',
  17. },
  18. overrides: [
  19. {
  20. files: ['*.ts'],
  21. extends: [
  22. 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
  23. 'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
  24. ],
  25. rules: {
  26. 'node/no-unsupported-features/es-syntax': 'off',
  27. '@typescript-eslint/explicit-module-boundary-types': 'off',
  28. '@typescript-eslint/no-non-null-assertion': 'off',
  29. '@typescript-eslint/no-explicit-any': 'off',
  30. '@typescript-eslint/no-unused-vars': 'off',
  31. // '@typescript-eslint/explicit-function-return-type': 'off',
  32. // '@typescript-eslint/no-namespace': 'off' // maybe we should consider enabling it in the future
  33. '@typescript-eslint/consistent-type-imports': 'error', // the replacement of "importsNotUsedAsValues": "error"
  34. },
  35. },
  36. ],
  37. };