UNPKG

@shayanthenerd/eslint-config

Version:

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

23 lines (22 loc) 617 B
//#region src/utils/vue/getRestrictedVueInputs.ts const alternativeComponents = { range: "Slider", date: "Calendar", radio: "RadioGroup", checkbox: "Checkbox", color: "ColorPicker", number: "InputNumber" }; const alternativeComponentPairs = Object.entries(alternativeComponents); function getRestrictedVueInputs(prefix) { const restrictedInputs = []; for (const [input, component] of alternativeComponentPairs) restrictedInputs.push({ element: "input", key: "type", value: input, message: `Use <${prefix}${component}>.` }); return restrictedInputs; } //#endregion export { getRestrictedVueInputs };