eslint.config.mjs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import ljharbConfig from '@ljharb/eslint-config/flat';
  2. export default [
  3. {
  4. ignores: ['dist/'],
  5. },
  6. ...ljharbConfig,
  7. {
  8. rules: {
  9. complexity: 'off',
  10. 'consistent-return': 'warn',
  11. 'func-name-matching': 'off',
  12. 'id-length': [
  13. 'error',
  14. {
  15. max: 25,
  16. min: 1,
  17. properties: 'never',
  18. },
  19. ],
  20. indent: ['error', 4],
  21. 'max-lines': 'off',
  22. 'max-lines-per-function': [
  23. 'error',
  24. { max: 150 },
  25. ],
  26. 'max-params': ['error', 18],
  27. 'max-statements': ['error', 100],
  28. 'multiline-comment-style': 'off',
  29. 'no-continue': 'warn',
  30. 'no-magic-numbers': 'off',
  31. 'no-restricted-syntax': [
  32. 'error',
  33. 'BreakStatement',
  34. 'DebuggerStatement',
  35. 'ForInStatement',
  36. 'LabeledStatement',
  37. 'WithStatement',
  38. ],
  39. },
  40. },
  41. {
  42. files: ['test/**'],
  43. rules: {
  44. 'function-paren-newline': 'off',
  45. 'max-lines-per-function': 'off',
  46. 'max-statements': 'off',
  47. 'no-buffer-constructor': 'off',
  48. 'no-extend-native': 'off',
  49. 'no-throw-literal': 'off',
  50. },
  51. },
  52. ];