.eslintrc.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. module.exports = {
  2. env: {
  3. browser: true,
  4. es2021: true
  5. },
  6. extends: [
  7. 'plugin:react/recommended',
  8. 'standard'
  9. ],
  10. parser: '@babel/eslint-parser',
  11. parserOptions: {
  12. ecmaFeatures: {
  13. jsx: true
  14. },
  15. ecmaVersion: 'latest',
  16. sourceType: 'module',
  17. requireConfigFile: false,
  18. babelOptions: {
  19. presets: ['@babel/preset-react']
  20. }
  21. },
  22. settings: {
  23. react: {
  24. version: 'detect'
  25. }
  26. },
  27. plugins: [
  28. 'react'
  29. ],
  30. overrides: [
  31. {
  32. files: ['**/*.js', '**/*.jsx'],
  33. rules: {
  34. 'no-unused-vars': ['off'],
  35. 'no-undef': ['off'],
  36. 'react/prop-types': ['off'],
  37. 'react/display-name': ['off'],
  38. 'no-var': 'warn',
  39. 'max-len': ['warn', { code: 120 }],
  40. 'jest/valid-expect': ['off'],
  41. 'react/react-in-jsx-scope': 'off',
  42. 'comma-dangle': ['warn', {
  43. arrays: 'never',
  44. objects: 'never',
  45. imports: 'never',
  46. exports: 'never',
  47. functions: 'never'
  48. }],
  49. semi: [2, 'always'],
  50. 'semi-spacing': ['warn', { before: false, after: true }]
  51. }
  52. }
  53. ]
  54. };