You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.9 KiB

4 years ago
  1. 'use strict';
  2. module.exports = {
  3. rules: {
  4. 'handle-done-callback': require('./lib/rules/handle-done-callback'),
  5. 'max-top-level-suites': require('./lib/rules/max-top-level-suites'),
  6. 'no-async-describe': require('./lib/rules/no-async-describe'),
  7. 'no-exclusive-tests': require('./lib/rules/no-exclusive-tests'),
  8. 'no-exports': require('./lib/rules/no-exports'),
  9. 'no-global-tests': require('./lib/rules/no-global-tests'),
  10. 'no-hooks': require('./lib/rules/no-hooks'),
  11. 'no-hooks-for-single-case': require('./lib/rules/no-hooks-for-single-case'),
  12. 'no-identical-title': require('./lib/rules/no-identical-title'),
  13. 'no-mocha-arrows': require('./lib/rules/no-mocha-arrows'),
  14. 'no-nested-tests': require('./lib/rules/no-nested-tests'),
  15. 'no-pending-tests': require('./lib/rules/no-pending-tests'),
  16. 'no-return-and-callback': require('./lib/rules/no-return-and-callback'),
  17. 'no-return-from-async': require('./lib/rules/no-return-from-async'),
  18. 'no-setup-in-describe': require('./lib/rules/no-setup-in-describe'),
  19. 'no-sibling-hooks': require('./lib/rules/no-sibling-hooks'),
  20. 'no-skipped-tests': require('./lib/rules/no-skipped-tests'),
  21. 'no-synchronous-tests': require('./lib/rules/no-synchronous-tests'),
  22. 'no-top-level-hooks': require('./lib/rules/no-top-level-hooks'),
  23. 'prefer-arrow-callback': require('./lib/rules/prefer-arrow-callback'),
  24. 'valid-suite-description': require('./lib/rules/valid-suite-description'),
  25. 'valid-test-description': require('./lib/rules/valid-test-description')
  26. },
  27. configs: {
  28. recommended: {
  29. plugins: [ 'mocha' ],
  30. rules: {
  31. 'mocha/handle-done-callback': 'error',
  32. 'mocha/max-top-level-suites': [ 'error', { limit: 1 } ],
  33. 'mocha/no-async-describe': 'error',
  34. 'mocha/no-exclusive-tests': 'warn',
  35. 'mocha/no-exports': 'error',
  36. 'mocha/no-global-tests': 'error',
  37. 'mocha/no-hooks': 'off',
  38. 'mocha/no-hooks-for-single-case': 'warn',
  39. 'mocha/no-identical-title': 'error',
  40. 'mocha/no-mocha-arrows': 'error',
  41. 'mocha/no-nested-tests': 'error',
  42. 'mocha/no-pending-tests': 'warn',
  43. 'mocha/no-return-and-callback': 'error',
  44. 'mocha/no-return-from-async': 'off',
  45. 'mocha/no-setup-in-describe': 'error',
  46. 'mocha/no-sibling-hooks': 'error',
  47. 'mocha/no-skipped-tests': 'warn',
  48. 'mocha/no-synchronous-tests': 'off',
  49. 'mocha/no-top-level-hooks': 'warn',
  50. 'mocha/prefer-arrow-callback': 'off',
  51. 'mocha/valid-suite-description': 'off',
  52. 'mocha/valid-test-description': 'off'
  53. }
  54. }
  55. }
  56. };