This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint-plugin-vue](https://eslint.vuejs.org) ([source](https://redirect.github.com/vuejs/eslint-plugin-vue)) | [`^9.32.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/eslint-plugin-vue/9.32.0/10.0.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vuejs/eslint-plugin-vue (eslint-plugin-vue)</summary> ### [`v10.0.0`](https://redirect.github.com/vuejs/eslint-plugin-vue/releases/tag/v10.0.0) [Compare Source](https://redirect.github.com/vuejs/eslint-plugin-vue/compare/v9.33.0...v10.0.0) #### 💥 Breaking changes - [#​2630](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2630) Changed Versioning Policy: - Allow minor versions of this plugin to enhance the checks for new features in Vue and Nuxt. - Allow updating deprecated/reserved HTML+SVG element tag names in minor versions, see [#​2171](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2171). - [#​2645](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2645) Removed deprecated rules (see [removed rules](https://eslint.vuejs.org/rules/#removed)). - [#​2669](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2669) Dropped support for old versions of ESLint and Node.js. New minimum requirements: - Node.js: `^18.18.0 || ^20.9.0 || >=21.1.0` - ESLint: `^8.57.0 || ^9.0.0` - Updated configs: - [#​2627](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2627) Added [`vue/block-order`](https://eslint.vuejs.org/rules/block-order.html) rule to recommended configs (replaces the removed `vue/component-tags-order` rule). - [#​2628](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2628) Added [`vue/no-deprecated-delete-set`](https://eslint.vuejs.org/rules/no-deprecated-delete-set.html) rule to vue3-essential config. - [#​2629](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2629) Added [`vue/no-deprecated-model-definition`](https://eslint.vuejs.org/rules/no-deprecated-model-definition.html) rule to vue3-essential config. - [#​2640](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2640) Added [`vue/no-required-prop-with-default`](https://eslint.vuejs.org/rules/no-required-prop-with-default.html) rule to recommended configs. - [#​2653](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2653) Added [`vue/valid-define-options`](https://eslint.vuejs.org/rules/valid-define-options.html) rule to vue3-essential config. - [#​2674](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2674) Removed globals from configs. - [#​2648](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2648) Renamed `.eslintrc` configs (to match `eslint.config.js` config names; see PR for comparison). - [#​2668](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2668) Changed `.eslintrc` base config so that [vue-eslint-parser](https://redirect.github.com/vuejs/vue-eslint-parser) is only used for `.vue` files. - [#​2670](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2670) Changed [vue-eslint-parser](https://redirect.github.com/vuejs/vue-eslint-parser) to peer dependency. - [#​2697](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2697) Upgraded [vue-eslint-parser](https://redirect.github.com/vuejs/vue-eslint-parser) to v10. - This includes [https://github.com/vuejs/vue-eslint-parser/pull/195](https://redirect.github.com/vuejs/vue-eslint-parser/pull/195), which should make the parser much faster for large TypeScript projects ⚡ - [#​2153](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2153) Added `slots` and `expose` to the default order of [`vue/order-in-components`](https://eslint.vuejs.org/rules/order-in-components.html) rule. - [#​2626](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2626) Removed legacy option from [`vue/custom-event-name-casing`](https://eslint.vuejs.org/rules/custom-event-name-casing.html) rule. - [#​2655](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2655) Removed unused `runOutsideVue` option from [`vue/sort-keys`](https://eslint.vuejs.org/rules/sort-keys.html) rule. - [#​2652](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2652) Removed `setup-compiler-macros` environments. #### ✨ Enhancements - [#​2693](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2693) Improved type resolution for generic types and improved the rules for checking type-only macros. - [#​2684](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2684) Added [`vue/no-import-compiler-macros`](https://eslint.vuejs.org/rules/no-import-compiler-macros.html) rule that disallows importing Vue compiler macros. - [#​2694](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2694) Added `except` option to [`vue/prefer-true-attribute-shorthand`](https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html) rule. - [#​2311](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2311) Improved the plugin to check for objects declared with Nuxt3 [`defineNuxtComponent()`](https://nuxt.com/docs/api/utils/define-nuxt-component). #### ⚙️ Updates - [#​2171](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2171) Updated resources. - [#​2675](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2675) Deprecated Vue 2 only rules. They will be removed in eslint-plugin-vue v11. **Full Changelog**: https://github.com/vuejs/eslint-plugin-vue/compare/v9.33.0...v10.0.0 ### [`v9.33.0`](https://redirect.github.com/vuejs/eslint-plugin-vue/releases/tag/v9.33.0) [Compare Source](https://redirect.github.com/vuejs/eslint-plugin-vue/compare/v9.32.0...v9.33.0) #### ✨ Enhancements - [#​2639](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2639) Added [`vue/no-implicit-coercion`](https://eslint.vuejs.org/rules/no-implicit-coercion.html) rule to disallow shorthand type conversions in `<template>`. - [#​2680](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2680) Improved [`vue/no-ref-as-operand`](https://eslint.vuejs.org/rules/no-ref-as-operand.html) rule to check `emit` payloads. - [#​2679](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2679) Added `ignoreProps` option to [`vue/prop-name-casing`](https://eslint.vuejs.org/rules/prop-name-casing.html) rule. #### 🐛 Bug Fixes - [#​2636](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2636) Fixed crash in [`vue/prefer-use-template-ref`](https://eslint.vuejs.org/rules/prefer-use-template-ref.html) rule when `setup` is an arrow function. - [#​2682](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2682) Fixed regex matching order in [`vue/no-bare-strings-in-template`](https://eslint.vuejs.org/rules/no-bare-strings-in-template.html) rule. - [#​2683](https://redirect.github.com/vuejs/eslint-plugin-vue/issues/2683) Fixed false positives for union type prop definitions in [`vue/max-props`](https://eslint.vuejs.org/rules/max-props.html) rule. **Full Changelog**: https://github.com/vuejs/eslint-plugin-vue/compare/v9.32.0...v9.33.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/unraid/api). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Unraid UI
A Vue 3 component library providing a set of reusable, accessible UI components for Unraid development.
Features
- ⚡️ Built with Vue 3 and TypeScript
- 🎭 Storybook documentation
- ✅ Tested components
- 🎪 Built on top of TailwindCSS and Shadcn/UI
Installation
Make sure you have the peer dependencies installed:
npm install vue@^3.3.0 tailwindcss@^3.0.0
Setup
1. Add CSS
Import the component library styles in your main entry file:
import '@unraid/ui/style.css';
2. Configure TailwindCSS
Create a tailwind.config.ts file with the following configuration:
import tailwindConfig from '@unraid/ui/tailwind.config.ts';
import type { Config } from 'tailwindcss';
export default {
presets: [tailwindConfig],
content: [
// ... your content paths
'./components/**/*.{js,vue,ts}',
'./layouts/**/*.vue',
'./pages/**/*.vue',
],
theme: {
extend: {
// your theme extensions
},
},
} satisfies Partial<Config>;
This configuration:
- Uses the Unraid UI library's Tailwind config as a preset
- Properly types your configuration with TypeScript
- Allows you to extend the base theme while maintaining all Unraid UI defaults
Usage
<script setup lang="ts">
import { Button } from '@unraid/ui';
</script>
<template>
<Button variant="primary"> Click me </Button>
</template>
Development
Local Development
Install dependencies:
npm install
Start Storybook development server:
npm run storybook
This will start Storybook at http://localhost:6006
Building
npm run build
Testing
Run tests:
npm run test
Run tests with UI:
npm run test:ui
Generate coverage report:
npm run coverage
Type Checking
npm run typecheck
Scripts
dev: Start development serverbuild: Build for productionpreview: Preview production buildtest: Run teststest:ui: Run tests with UIcoverage: Generate test coverageclean: Remove build artifactstypecheck: Run type checkingstorybook: Start Storybook development serverbuild-storybook: Build Storybook for production
License
Component Development
Installing Shadcn Components
- Install a new component using the Shadcn CLI:
npx shadcn-vue@latest add [component-name]
-
The component will be installed in the root components folder. Move it to the appropriate subfolder based on its type:
- Form components →
src/components/form/ - Layout components →
src/components/layout/ - Common components →
src/components/common/ - Brand components →
src/components/brand/
- Form components →
-
Update any imports in your codebase to reflect the new component location.
Component Variants Pattern
We use the class-variance-authority (CVA) package to manage component variants. Each component that supports variants should follow this pattern:
- Create a variants file (e.g.,
button.variants.ts):
import { cva } from 'class-variance-authority';
export const buttonVariants = cva('base-classes-here', {
variants: {
variant: {
primary: 'variant-specific-classes',
secondary: 'variant-specific-classes',
// ... other variants
},
size: {
sm: 'size-specific-classes',
md: 'size-specific-classes',
lg: 'size-specific-classes',
},
},
defaultVariants: {
variant: 'primary',
size: 'md',
},
});
- Use the variants in your component (e.g.,
Button.vue):
<script setup lang="ts">
import { computed } from "vue";
import { buttonVariants } from "./button.variants";
import { cn } from "@/lib/utils";
export interface ButtonProps {
variant?: "primary" | "secondary" | /* other variants */;
size?: "sm" | "md" | "lg";
class?: string;
}
const props = withDefaults(defineProps<ButtonProps>(), {
variant: "primary",
size: "md",
});
const buttonClass = computed(() => {
return cn(
buttonVariants({ variant: props.variant, size: props.size }),
props.class
);
});
</script>
<template>
<button :class="buttonClass">
<slot />
</button>
</template>
Storybook Development
We use Storybook for component development and documentation. To start the Storybook development server:
npm run storybook
This will start Storybook at http://localhost:6006
When creating stories for your components:
- Place story files in the
storiesdirectory - Name your story files as
ComponentName.stories.ts - Include examples of all variants and states
- Add documentation using JSDoc comments
Example story file:
import type { Meta, StoryObj } from '@storybook/vue3';
import { Button } from '../src/components/common/button';
const meta = {
title: 'Components/Button',
component: Button,
tags: ['autodocs'],
argTypes: {
variant: {
control: 'select',
options: ['primary', 'secondary', 'outline'],
},
size: {
control: 'select',
options: ['sm', 'md', 'lg'],
},
},
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Primary: Story = {
args: {
variant: 'primary',
size: 'md',
},
};
export const Secondary: Story = {
args: {
variant: 'secondary',
size: 'md',
},
};