UNPKG

@shayanthenerd/eslint-config

Version:

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

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