.eslintrc.js 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module.exports = {
  2. root: true, // https://eslint.org/docs/user-guide/configuring/configuration-files#cascading-and-hierarchy
  3. extends: [
  4. 'weseek',
  5. 'weseek/react',
  6. 'weseek/typescript',
  7. "plugin:jest/recommended",
  8. ],
  9. env: {
  10. jquery: true,
  11. "jest/globals": true,
  12. },
  13. globals: {
  14. $: true,
  15. jquery: true,
  16. emojione: true,
  17. hljs: true,
  18. ScrollPosStyler: true,
  19. window: true,
  20. },
  21. plugins: [
  22. "jest",
  23. ],
  24. rules: {
  25. 'import/prefer-default-export': 'off',
  26. 'no-restricted-imports': ['error', {
  27. name: 'axios',
  28. message: 'Please use src/utils/axios instead.',
  29. }],
  30. '@typescript-eslint/no-explicit-any': 'off',
  31. indent: [
  32. 'error',
  33. 2,
  34. {
  35. SwitchCase: 1,
  36. ignoredNodes: ['JSXElement *', 'JSXElement', 'JSXAttribute', 'JSXSpreadAttribute'],
  37. ArrayExpression: 'first',
  38. FunctionDeclaration: { body: 1, parameters: 2 },
  39. FunctionExpression: { body: 1, parameters: 2 },
  40. },
  41. ],
  42. },
  43. };