.eslintrc.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // https://eslint.org/docs/user-guide/configuring
  2. // File taken from https://github.com/vuejs-templates/webpack/blob/1.3.1/template/.eslintrc.js, thanks.
  3. module.exports = {
  4. root: true,
  5. parserOptions: {
  6. parser: '@babel/eslint-parser',
  7. },
  8. env: {
  9. browser: true,
  10. webextensions: true,
  11. },
  12. // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
  13. // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
  14. extends: [
  15. 'plugin:vue/vue3-recommended',
  16. 'airbnb-base',
  17. 'plugin:prettier/recommended',
  18. ],
  19. // required to lint *.vue files
  20. plugins: ['vue'],
  21. // check if imports actually resolve
  22. settings: {
  23. 'import/resolver': {
  24. webpack: {
  25. config: './webpack.config.js',
  26. },
  27. },
  28. },
  29. // add your custom rules here
  30. rules: {
  31. 'no-undef': 'off',
  32. 'func-names': 'off',
  33. 'import/extensions': [
  34. 'error',
  35. 'always',
  36. {
  37. js: 'never',
  38. },
  39. ],
  40. // disallow reassignment of function parameters
  41. // disallow parameter object manipulation except for specific exclusions
  42. 'no-param-reassign': 'off',
  43. 'import/no-extraneous-dependencies': 'off',
  44. // disallow default export over named export
  45. 'import/prefer-default-export': 'off',
  46. // allow debugger during development
  47. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  48. },
  49. };