UNPKG

@shayanthenerd/eslint-config

Version:

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

22 lines (21 loc) 570 B
//#region src/helpers/vue/getRestrictedVueInputs.ts const alternativeComponentPairs = Object.entries({ range: "Slider", date: "Calendar", radio: "RadioGroup", checkbox: "Checkbox", color: "ColorPicker", number: "InputNumber" }); 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 };