UNPKG

@shayanthenerd/eslint-config

Version:

A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style

26 lines (25 loc) 644 B
//#region src/helpers/vue/getRestrictedVueElements.ts const alternativeComponentPairs = Object.entries({ kbd: "Kbd", form: "Form", input: "Input", table: "Table", dialog: "Modal", hr: "Separator", button: "Button", select: "Select", progress: "Progress", textarea: "Textarea", details: "Accordion", datalist: "InputMenu" }); function getRestrictedVueElements(prefix) { const restrictedElements = []; for (const [element, component] of alternativeComponentPairs) restrictedElements.push({ element, message: `Use \`<${prefix}${component}>\`.` }); return restrictedElements; } //#endregion export { getRestrictedVueElements };