Классы с ошибкой:
- (произвольные значения в скобках/обратной косой черте)
Код: Выделить всё
h-[76px] - (дроби)
Код: Выделить всё
top-1/2 - (десятичные числа)
Код: Выделить всё
right-2.5 - (отрицательные значения с дефисом в начале)
Код: Выделить всё
-translate-y-1/2 - (произвольные шестнадцатеричные цвета)
Код: Выделить всё
text-[001C3F]
Код: Выделить всё
{
"extends": [
"html-validate:recommended"
],
"rules": {
"parser-error": "off",
"class-pattern": [
"error",
{
"pattern": "kebabcase"
}
],
"no-dup-class": "error",
"valid-id": "error",
"no-dup-id": "error",
"attr-spacing": "off",
"doctype-style": "off",
"long-title": "off",
"no-inline-style": "off",
"require-sri": "off",
"no-unknown-elements": "off",
"no-implicit-close": "off",
"void-style": "off"
}
}
Код: Выделить всё
/home/Kevindodiya75/bytelogik_shop/layouts/index.html
3:17 error class "h-[76px]" does not match the configured pattern "kebabcase" class-pattern
5:30 error class "text-[001C3F]" does not match the configured pattern "kebabcase" class-pattern
18:33 error class "right-2.5" does not match the configured pattern "kebabcase" class-pattern
18:43 error class "top-1/2" does not match the configured pattern "kebabcase" class-pattern
18:61 error class "-translate-y-1/2" does not match the configured pattern "kebabcase" class-pattern
✖ 5 problems (5 errors, 0 warnings)
- Использование шаблона «кебабкейс» по умолчанию (не работает в синтаксисе Tailwind, как показано выше)
- Полное отключение правила (работает, но теряется вся проверка имени класса)
Подробнее здесь: https://stackoverflow.com/questions/798 ... forcing-ke