Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Add no localstorage rule
Andrew Bastin257e2db6513a
diff --git a/.eslintrc.js b/.eslintrc.jsindex c5434b1b3..260788273 100644--- a/.eslintrc.js+++ b/.eslintrc.js@@ -42,6 +42,24 @@ module.exports = {"prettier/prettier": ["warn", { semi: false }],"import/no-named-as-default": "off","no-undef": "off",+ // localStorage block+ "no-restricted-globals": [+ "error",+ {+ name: "localStorage",+ message:+ "Do not use 'localStorage' directly. Please use localpersistence.ts functions or stores",+ }+ ],+ // window.localStorage block+ "no-restricted-syntax": [+ "error",+ {+ selector: "CallExpression[callee.object.property.name='localStorage']",+ message:+ "Do not use 'localStorage' directly. Please use localpersistence.ts functions or stores",+ },+ ],},globals: {$nuxt: true,