2
0

.eslintrc.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. module.exports = {
  2. root: true, // https://eslint.org/docs/user-guide/configuring/configuration-files#cascading-and-hierarchy
  3. extends: [
  4. 'weseek',
  5. 'weseek/typescript',
  6. 'plugin:jest/recommended',
  7. ],
  8. env: {
  9. 'jest/globals': true,
  10. },
  11. globals: {
  12. },
  13. plugins: [
  14. 'jest',
  15. 'regex',
  16. ],
  17. rules: {
  18. 'import/prefer-default-export': 'off',
  19. 'import/order': [
  20. 'warn',
  21. {
  22. pathGroups: [
  23. {
  24. pattern: 'react',
  25. group: 'builtin',
  26. position: 'before',
  27. },
  28. {
  29. pattern: '^/**',
  30. group: 'parent',
  31. position: 'before',
  32. },
  33. {
  34. pattern: '~/**',
  35. group: 'parent',
  36. position: 'before',
  37. },
  38. ],
  39. alphabetize: {
  40. order: 'asc',
  41. },
  42. pathGroupsExcludedImportTypes: ['react'],
  43. 'newlines-between': 'always',
  44. },
  45. ],
  46. '@typescript-eslint/no-explicit-any': 'off',
  47. indent: [
  48. 'error',
  49. 2,
  50. {
  51. SwitchCase: 1,
  52. ArrayExpression: 'first',
  53. FunctionDeclaration: { body: 1, parameters: 2 },
  54. FunctionExpression: { body: 1, parameters: 2 },
  55. },
  56. ],
  57. 'jest/no-standalone-expect': [
  58. 'error',
  59. { additionalTestBlockFunctions: ['each.test'] },
  60. ],
  61. 'regex/invalid': ['error', [
  62. {
  63. regex: '\\?\\<\\!',
  64. message: 'Do not use any negative lookbehind',
  65. }, {
  66. regex: '\\?\\<\\=',
  67. message: 'Do not use any Positive lookbehind',
  68. },
  69. ]],
  70. },
  71. };