UNPKG

@dfinity/eslint-config-oisy-wallet

Version:

Shared ESLint configurations from the Oisy Wallet team

28 lines (25 loc) 626 B
module.exports = { meta: { docs: { description: "Svelte stores should not be used in APIs since they are also utilized by workers.", category: "Possible Errors", recommended: false, }, schema: [], }, create: (context) => ({ ImportDeclaration: (node) => { const filePath = context.filename; const { source: { value }, } = node; if (filePath.includes("/api/") && value === "svelte/store") { context.report({ node, message: "Importing 'svelte/store' is not allowed in API modules.", }); } }, }), };