.eslintrc.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. hljs: true,
  16. ScrollPosStyler: true,
  17. window: true,
  18. },
  19. settings: {
  20. // resolve path aliases by eslint-import-resolver-typescript
  21. 'import/resolver': {
  22. typescript: {},
  23. },
  24. },
  25. rules: {
  26. 'no-restricted-imports': ['error', {
  27. name: 'axios',
  28. message: 'Please use src/utils/axios instead.',
  29. }],
  30. 'regex/invalid': ['error', [
  31. {
  32. regex: '\\?\\<\\!',
  33. message: 'Do not use any negative lookbehind',
  34. }, {
  35. regex: '\\?\\<\\=',
  36. message: 'Do not use any Positive lookbehind',
  37. },
  38. ]],
  39. '@typescript-eslint/no-var-requires': 'off',
  40. // set 'warn' temporarily -- 2021.08.02 Yuki Takei
  41. '@typescript-eslint/explicit-module-boundary-types': ['warn'],
  42. '@typescript-eslint/no-use-before-define': ['warn'],
  43. '@typescript-eslint/no-this-alias': ['warn'],
  44. 'jest/no-done-callback': ['warn'],
  45. },
  46. };