.eslintrc.js 1.1 KB

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