.eslintrc.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module.exports = {
  2. extends: ['@joystream/eslint-config', 'plugin:jest/recommended'],
  3. rules: {
  4. '@typescript-eslint/explicit-module-boundary-types': 'off',
  5. '@typescript-eslint/no-non-null-assertion': 'off',
  6. '@typescript-eslint/naming-convention': [
  7. 'error',
  8. {
  9. selector: 'default',
  10. format: ['camelCase'],
  11. },
  12. {
  13. selector: 'variable',
  14. format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
  15. },
  16. {
  17. selector: 'property',
  18. format: [], // Don't force format of object properties, so they can be ie.: { "Some thing": 123 }, { some_thing: 123 } etc.
  19. },
  20. {
  21. selector: 'accessor',
  22. format: ['camelCase', 'snake_case'],
  23. },
  24. {
  25. selector: 'enumMember',
  26. format: ['PascalCase'],
  27. },
  28. {
  29. selector: 'typeLike',
  30. format: [],
  31. custom: { regex: '^([A-Z][a-z0-9]*_?)+', match: true }, // combined PascalCase and snake_case to allow ie. OpeningType_Worker
  32. },
  33. {
  34. selector: 'classMethod',
  35. modifiers: ['static'],
  36. format: ['PascalCase'],
  37. },
  38. ],
  39. },
  40. plugins: ['jest'],
  41. }