Skip to content

Conversation

@DianaSuvorova
Copy link

Hi,

This is a fairly large change — happy to break it into smaller PRs if preferred.

This PR introduces HTML linting using @html-eslint, which covers formatting, accessibility (a11y), and semantic HTML rules.

The changes here are the result of running npm run lint --fix. There are still a few issues that weren't auto-fixed — I've included them below for visibility.

If this direction looks good, I’d be happy to:

  • follow up with manual fixes for the remaining issues,
  • set up a GitHub Action to run lint checks on PRs,
  • and potentially add more plugins like Tailwind and Alpine.js support.

Looking forward to your feedback!

dianasuvorova@mac pines % npm run lint

> [email protected] lint
> eslint **/*.html --fix


/Users/dianasuvorova/Dev/pines/elements/card.html
  3:9  error  Missing `alt` attribute at `<img>` tag  @html-eslint/require-img-alt

/Users/dianasuvorova/Dev/pines/elements/combobox.html
  97:13  error  Invalid container of `<li>`. <li>` should be in `<ul>`, `<ol>` or `<menu>`  @html-eslint/require-li-container

/Users/dianasuvorova/Dev/pines/elements/copy-to-clipboard.html
  23:13  error  The attribute 'class' is duplicated  @html-eslint/no-duplicate-attrs

/Users/dianasuvorova/Dev/pines/elements/dropdown-menu.html
  7:9  error  Missing `alt` attribute at `<img>` tag  @html-eslint/require-img-alt

/Users/dianasuvorova/Dev/pines/elements/full-screen-modal.html
  69:17  error  Missing `alt` attribute at `<img>` tag  @html-eslint/require-img-alt

/Users/dianasuvorova/Dev/pines/elements/image-gallery.html
  80:17  error  Invalid container of `<li>`. <li>` should be in `<ul>`, `<ol>` or `<menu>`  @html-eslint/require-li-container
  81:21  error  Missing `alt` attribute at `<img>` tag                                      @html-eslint/require-img-alt

/Users/dianasuvorova/Dev/pines/elements/rating.html
  46:17  error  Invalid container of `<li>`. <li>` should be in `<ul>`, `<ol>` or `<menu>`  @html-eslint/require-li-container

/Users/dianasuvorova/Dev/pines/elements/select.html
  200:13  error  Invalid container of `<li>`. <li>` should be in `<ul>`, `<ol>` or `<menu>`  @html-eslint/require-li-container

/Users/dianasuvorova/Dev/pines/elements/sticky-header.html
  48:5  error  The attribute 'x-data' is duplicated  @html-eslint/no-duplicate-attrs

/Users/dianasuvorova/Dev/pines/elements/toast.html
  441:17  error  Invalid container of `<li>`. <li>` should be in `<ul>`, `<ol>` or `<menu>`  @html-eslint/require-li-container

/Users/dianasuvorova/Dev/pines/getting-started/alpine-plugin.html
   5:1  error  Missing closing tag for p  @html-eslint/require-closing-tags
  17:5  error  Missing closing tag for p  @html-eslint/require-closing-tags

/Users/dianasuvorova/Dev/pines/getting-started/introduction.html
  96:21  error  The attribute 'class' is duplicated  @html-eslint/no-duplicate-attrs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant