[lint] Enforce custom dark-theme: prefix instead of standard dark: prefix (#5382)

- Add vue/no-restricted-class ESLint rule to catch dark: prefix usage
- Fix existing violation in FormImageUpload.vue (dark: -> dark-theme:)
- Ensures consistent usage of project's custom Tailwind variant
- Violations will fail builds and be caught during development

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Christian Byrne
2025-09-06 01:57:46 -07:00
committed by GitHub
parent 42128fa39f
commit b00952e6b3
2 changed files with 3 additions and 1 deletions

View File

@@ -62,6 +62,8 @@ export default [
'@typescript-eslint/prefer-as-const': 'off',
'unused-imports/no-unused-imports': 'error',
'vue/no-v-html': 'off',
// Enforce dark-theme: instead of dark: prefix
'vue/no-restricted-class': ['error', '/^dark:/'],
// i18n rules
'@intlify/vue-i18n/no-raw-text': [
'error',

View File

@@ -3,7 +3,7 @@
<div class="flex gap-2 items-center">
<div
class="preview-box border rounded p-2 w-16 h-16 flex items-center justify-center"
:class="{ 'bg-gray-100 dark:bg-gray-800': !modelValue }"
:class="{ 'bg-gray-100 dark-theme:bg-gray-800': !modelValue }"
>
<img
v-if="modelValue"