123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- /* eslint-env node */
- require("@rushstack/eslint-patch/modern-module-resolution")
- module.exports = {
- root: true,
- env: {
- browser: true,
- node: true,
- },
- parserOptions: {
- sourceType: "module",
- requireConfigFile: false,
- ecmaFeatures: {
- jsx: false,
- },
- },
- extends: [
- "@vue/typescript/recommended",
- "plugin:vue/vue3-recommended",
- "plugin:prettier/recommended",
- ],
- ignorePatterns: [
- "static/**/*",
- "./helpers/backend/graphql.ts",
- "**/*.d.ts",
- "types/**/*",
- ],
- plugins: ["vue", "prettier"],
- // add your custom rules here
- rules: {
- semi: [2, "never"],
- "import/named": "off", // because, named import issue with typescript see: https://github.com/typescript-eslint/typescript-eslint/issues/154
- "no-console": "off",
- "no-debugger": process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
- "prettier/prettier": [
- process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
- {},
- {
- semi: false,
- trailingComma: "es5",
- singleQuote: false,
- printWidth: 80,
- useTabs: false,
- tabWidth: 2,
- },
- ],
- "vue/multi-word-component-names": "off",
- "vue/no-side-effects-in-computed-properties": "off",
- "import/no-named-as-default": "off",
- "import/no-named-as-default-member": "off",
- "@typescript-eslint/no-unused-vars":
- process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
- "@typescript-eslint/no-non-null-assertion": "off",
- "@typescript-eslint/no-explicit-any": "off",
- "import/default": "off",
- "no-undef": "off",
- // localStorage block
- "no-restricted-globals": [
- "error",
- {
- name: "localStorage",
- message:
- "Do not use 'localStorage' directly. Please use the PersistenceService",
- },
- ],
- // window.localStorage block
- "no-restricted-syntax": [
- "error",
- {
- selector: "CallExpression[callee.object.property.name='localStorage']",
- message:
- "Do not use 'localStorage' directly. Please use the PersistenceService",
- },
- ],
- eqeqeq: 1,
- "no-else-return": 1,
- },
- }
|