.eslintrc.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. module.exports = {
  2. extends: [
  3. 'next/core-web-vitals',
  4. 'weseek/react',
  5. ],
  6. plugins: [
  7. ],
  8. settings: {
  9. // resolve path aliases by eslint-import-resolver-typescript
  10. 'import/resolver': {
  11. typescript: {},
  12. },
  13. },
  14. rules: {
  15. 'no-restricted-imports': ['error', {
  16. name: 'axios',
  17. message: 'Please use src/utils/axios instead.',
  18. }],
  19. '@typescript-eslint/no-var-requires': 'off',
  20. // set 'warn' temporarily -- 2021.08.02 Yuki Takei
  21. '@typescript-eslint/no-use-before-define': ['warn'],
  22. '@typescript-eslint/no-this-alias': ['warn'],
  23. },
  24. overrides: [
  25. {
  26. // enable the rule specifically for JavaScript files
  27. files: ['*.js', '*.jsx'],
  28. rules: {
  29. // set 'warn' temporarily -- 2023.08.14 Yuki Takei
  30. 'react/prop-types': 'warn',
  31. // set 'warn' temporarily -- 2023.08.14 Yuki Takei
  32. 'no-unused-vars': ['warn'],
  33. },
  34. },
  35. {
  36. // enable the rule specifically for TypeScript files
  37. files: ['*.ts', '*.tsx'],
  38. rules: {
  39. 'no-unused-vars': 'off',
  40. // set 'warn' temporarily -- 2023.08.14 Yuki Takei
  41. 'react/prop-types': 'warn',
  42. // set 'warn' temporarily -- 2022.07.25 Yuki Takei
  43. '@typescript-eslint/explicit-module-boundary-types': ['warn'],
  44. },
  45. },
  46. ],
  47. };