.eslintrc.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. module.exports = {
  2. extends: [
  3. 'weseek/react',
  4. 'weseek/typescript',
  5. ],
  6. plugins: [
  7. 'regex',
  8. ],
  9. env: {
  10. jquery: true,
  11. },
  12. globals: {
  13. $: true,
  14. jquery: true,
  15. emojione: true,
  16. hljs: true,
  17. ScrollPosStyler: true,
  18. window: true,
  19. },
  20. settings: {
  21. // resolve path aliases by eslint-import-resolver-typescript
  22. 'import/resolver': {
  23. typescript: {},
  24. },
  25. },
  26. rules: {
  27. 'no-restricted-imports': ['error', {
  28. name: 'axios',
  29. message: 'Please use src/utils/axios instead.',
  30. }],
  31. 'regex/invalid': ['error', [
  32. {
  33. regex: '\\?\\<\\!',
  34. message: 'Do not use any negative lookbehind',
  35. }, {
  36. regex: '\\?\\<\\=',
  37. message: 'Do not use any Positive lookbehind',
  38. },
  39. ]],
  40. '@typescript-eslint/no-var-requires': 'off',
  41. // set 'warn' temporarily -- 2021.08.02 Yuki Takei
  42. '@typescript-eslint/explicit-module-boundary-types': ['warn'],
  43. '@typescript-eslint/no-use-before-define': ['warn'],
  44. '@typescript-eslint/no-this-alias': ['warn'],
  45. 'jest/no-done-callback': ['warn'],
  46. },
  47. };