.eslintrc.js 1.3 KB

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