hoppscotch/.eslintrc.js

68 lines
1.8 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",
],
plugins: ["vue", "prettier"],
// add your custom rules here
rules: {
semi: [2, "never"],
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"vue/max-attributes-per-line": "off",
"vue/component-name-in-template-casing": ["error", "PascalCase"],
"vue/html-self-closing": [
"error",
{
html: {
normal: "never",
void: "always",
},
},
],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline": "off",
2021-05-19 04:54:57 +00:00
"vue/require-default-prop": "warn",
"vue/require-prop-types": "warn",
2021-05-17 16:26:25 +00:00
"prettier/prettier": ["warn", { semi: false }],
"import/no-named-as-default": "off",
"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,
},
}