.eslintrc.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* eslint-env node */
  2. require("@rushstack/eslint-patch/modern-module-resolution")
  3. module.exports = {
  4. root: true,
  5. env: {
  6. browser: true,
  7. node: true,
  8. jest: true,
  9. },
  10. parserOptions: {
  11. sourceType: "module",
  12. requireConfigFile: false,
  13. },
  14. extends: [
  15. "@vue/typescript/recommended",
  16. "plugin:vue/vue3-recommended",
  17. "plugin:prettier/recommended",
  18. "plugin:storybook/recommended",
  19. ],
  20. ignorePatterns: [
  21. "static/**/*",
  22. "./helpers/backend/graphql.ts",
  23. "**/*.d.ts",
  24. "types/**/*",
  25. ],
  26. plugins: ["vue", "prettier"],
  27. // add your custom rules here
  28. rules: {
  29. semi: [2, "never"],
  30. "import/named": "off",
  31. // because, named import issue with typescript see: https://github.com/typescript-eslint/typescript-eslint/issues/154
  32. "no-console": "off",
  33. "no-debugger": process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
  34. "prettier/prettier":
  35. process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
  36. "vue/multi-word-component-names": "off",
  37. "vue/no-side-effects-in-computed-properties": "off",
  38. "import/no-named-as-default": "off",
  39. "import/no-named-as-default-member": "off",
  40. "@typescript-eslint/no-unused-vars":
  41. process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
  42. "@typescript-eslint/no-non-null-assertion": "off",
  43. "@typescript-eslint/no-explicit-any": "off",
  44. "import/default": "off",
  45. "no-undef": "off",
  46. },
  47. }