api-client/packages/hoppscotch-app/.eslintrc.js

57 lines
1.6 KiB
JavaScript
Raw Normal View History

2021-05-17 05:55:50 +00:00
module.exports = {
root: true,
env: {
browser: true,
node: true,
jest: true,
},
parserOptions: {
sourceType: "module",
requireConfigFile: false,
},
extends: [
"@nuxtjs",
2021-05-17 09:47:23 +00:00
"@nuxtjs/eslint-config-typescript",
2021-05-17 05:55:50 +00:00
"prettier/prettier",
"eslint:recommended",
"plugin:vue/recommended",
"plugin:prettier/recommended",
"plugin:nuxt/recommended",
],
2021-11-04 12:53:50 +00:00
ignorePatterns: ["helpers/backend/graphql.ts"],
plugins: ["vue", "nuxt", "prettier"],
2021-05-17 05:55:50 +00:00
// add your custom rules here
rules: {
semi: [2, "never"],
2021-08-29 05:19:10 +00:00
"import/named": "off", // because, named import issue with typescript see: https://github.com/typescript-eslint/typescript-eslint/issues/154
2021-05-17 05:55:50 +00:00
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
2021-11-04 12:53:50 +00:00
"vue/multi-word-component-names": "off",
2021-05-17 16:26:25 +00:00
"import/no-named-as-default": "off",
2021-11-04 12:53:50 +00:00
"import/no-named-as-default-member": "off",
"import/default": "off",
2021-05-17 16:26:25 +00:00
"no-undef": "off",
2021-06-21 01:53:54 +00:00
// localStorage block
"no-restricted-globals": [
"error",
{
name: "localStorage",
message:
"Do not use 'localStorage' directly. Please use localpersistence.ts functions or stores",
2021-06-21 04:27:45 +00:00
},
2021-06-21 01:53:54 +00:00
],
// window.localStorage block
"no-restricted-syntax": [
"error",
{
selector: "CallExpression[callee.object.property.name='localStorage']",
2021-06-21 04:27:45 +00:00
message:
2021-06-21 01:53:54 +00:00
"Do not use 'localStorage' directly. Please use localpersistence.ts functions or stores",
},
],
2021-05-17 05:55:50 +00:00
},
globals: {
$nuxt: true,
},
}