npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@simbiat/html-eslint-plugin-simbiat

v1.0.0

Published

Custom @html-eslint rules used in simbiat.eu project: anchor text-node wrapping, button/input preference, redundant alt text, and checkbox label structure.

Readme

eslint-plugin-html-simbiat

Custom @html-eslint rules used in the simbiat.eu project, for Twig templates. Created with the use of Claude AI, but manually reviewed, adjusted, and tested on the existing codebase. All are suggestions and fixable.

Installation

npm install --save-dev @simbiat/hmtl-eslint-plugin-simbiat

Usage (flat config)

// eslint.config.js
import htmlPlugin from '@html-eslint/eslint-plugin';
import htmlParser from '@html-eslint/parser';
import simbiat from '@simbiat/eslint-plugin-html-simbiat';

export default [
  {
    files: ['**/*.html'],
    plugins: { html: htmlPlugin, simbiat },
    language: 'html/html',
    rules: {
      'simbiat/require-span-in-anchor-text': 'warn',
      'simbiat/prefer-button-over-input':    'warn',
      'simbiat/no-redundant-alt':            'warn',
      'simbiat/checkbox-label-structure':    'warn',
      'require-float-label-wrapper':         'warn',
    },
  },
];

Rules

simbiat/require-span-in-anchor-text

Requires every direct, non-whitespace-only Text child of an <a> to be wrapped in <span>, so anchor content can be targeted by CSS consistently. This is useful since CSS itself cannot target text nodes, and depending on how you style the links, you can get various abnormalities. Whitespace-only text (pure formatting/indentation) is left alone; only the trimmed inner content is wrapped, so surrounding whitespace stays outside the <span>.

<!-- ✗ flagged -->
<a href="/profile">
    <img src="avatar.png" alt="">
    {{ user.name }}
</a>

<!-- ✓ OK -->
<a href="/profile">
    <img src="avatar.png" alt="">
    <span>{{ user.name }}</span>
</a>

simbiat/prefer-button-over-input

Flags <input type="button|submit|reset|image">, suggesting <button> instead:

<!-- ✗ flagged -->
<input type="submit" value="Send">

<!-- ✓ suggested replacement -->
<button type="submit" value="Send">
    Send
</button>

simbiat/no-redundant-alt

Flags <img alt="X"> sitting directly next to a sibling whose own text content is that same X - the alt text is then read out twice by a screen reader. Matches both a tag-wrapped duplicate and bare adjacent text:

<!-- ✗ flagged (both forms) -->
<a href="/edit"><img src="edit.png" alt="Edit"><span>Edit</span></a>
<a href="/edit"><img src="edit.png" alt="Edit">Edit</a>

<!-- ✓ OK -->
<a href="/edit"><img src="edit.png" alt=""><span>Edit</span></a>

simbiat/checkbox-label-structure

Requires <input type="checkbox" id="X"> paired with an adjacent <label for="X"> to structure the label's content as four spans, so CSS can toggle checked/unchecked text and icon independently per instance without use of JavaScript.

<!-- ✗ flagged -->
<input id="agree" type="checkbox">
<label for="agree">I agree</label>

<!-- ✓ OK (structure required; content is yours to customize) -->
<input id="agree" type="checkbox">
<label for="agree">
    <span class="checkbox_checked_icon" aria-hidden="true"></span>
    <span class="checkbox_checked">I agree</span>
    <span class="checkbox_not_checked_icon" aria-hidden="true"></span>
    <span class="checkbox_not_checked">I agree</span>
</label>

Detection is structural only: a label already containing all four required span classes is conformant regardless of its actual content, since customizing that content per instance (different wording, a custom icon) is the entire point of the pattern.

Options

'simbiat/checkbox-label-structure': ['warn', {
  checkedIconClass:   'checkbox_checked_icon',
  checkedClass:        'checkbox_checked',
  uncheckedIconClass: 'checkbox_not_checked_icon',
  uncheckedClass:      'checkbox_not_checked',
}]

All four default to the values shown above. Only the class names are configurable - the four-span shape itself isn't.


simbiat/require-float-label-wrapper

Wraps input, select and textarea elements with their adjacent label into a div (default) with class float_label (default). This is a common pattern for making "floating" labels, which move on top of the element on interactions or when the element has content. If already wrapped into any tag with respective class - will not be suggested.

<!-- ✗ flagged -->
<input id="input_box" type="text">
<label for="input_box">Some random text</label>

<!-- ✓ OK (structure required; content is yours to customize) -->
<div class="float_label">
    <input id="input_box" type="text">
    <label for="input_box">Some random text</label>
</div>

Options

'simbiat/require-float-label-wrapper': ['warn', {
    wrapperClass:   'float_label',
    wrapperClass:   'div',
}]