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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wrckt/nx-htmlhint

v18.3.2

Published

<div align="center">

Downloads

245

Readme

nx-htmlhint

Nx plugin to use HTMLHint in your Nx workspace.

NPM Version NPM Downloads NPM dev or peer Dependency Version NPM dev or peer Dependency Version GitHub Actions Workflow Status NPM License

🚀 Features

nx-htmlhint provides a set tools for Nx to lint your projects' html with HTMLHint.

  • Executor: Provides an executor to lint your html with HTMLHint.
  • Generators: Helping you to configure your projects.
  • Configuration: Per project configuration or worksace configurations.
  • Only Affected: Uses Nx to support linting only affected projects.
  • Cache: Uses Nx to cache already linted projects.

📦 Installation

using npm

npm i -D @wrckt/nx-htmlhint

using yarn

yarn add -D @wrckt/nx-htmlhint

using pnpm

pnpm add -D @wrckt/nx-htmlhint

🛠️ Configuring HTMLHint for a project

To add a HTMLHint configuration to a project you just have to run the @wrckt/nx-htmlhint:configuration generator.

nx g @wrckt/nx-htmlhint:configuration --project <projectName>

The generator adds a .htmlhintrc at the project root and adds a htmlhint target to the project.

At the first run the generator installs all required dependencies. It also configures the namedInputs for the htmlhint targets.

Examples

Run @wrckt/nx-htmlhint for a project

nx htmlhint <projectName>

Run @wrckt/nx-htmlhint for all projects

nx run-many --target=htmlhint

Run @wrckt/nx-htmlhint for affected projects

nx affected --target=htmlhint

📖 Documentation

@wrckt/nx-htmlhint:configuration generator

Add htmlhint configuration to a project.

Usage

Add configuration to a project:

nx g @wrckt/nx-htmlhint:configuration --projectName projectName

Options

|Option|Value|Description| |------------|------------|------------| |projectName|string|The name of the project.| |withConfig|boolean|Adds individual .htmlhintrc to project.| |skipFormat|boolean|Skip formatting files.|

nx-htmlhint:lint executor

Run htmlhint on a project.

Target Options can be configured in project.json or when the executor is invoked.

See: https://nx.dev/configuration/projectjson#targets

Options

|Option|Value|Default|Description| |----|----|----|----| |lintFilePattern|string|| Single file/dir/glob to pass directly to HTMLHint executor| |config|string|| Path to a .htmlhint configuration file.| |rules|string[]|| List of rules to be applied by linter.| |rulesdir|string|| Path to file or directory containing custom rules to be applied by linter.| |ignore|string[]|| A list of patterns of files or folders to ignore.| |noColor|boolean|false|Force enabling/disabling of color.| |warn|boolean|false| Only warn on error. Process will always exit with code 0.|

Compatibility with Nx and HTMLHint

nx-htmlhint depends on Nx and HTMLHint. This table provides the compatibility matrix between versions of nx-htmlhint, Nx and HTMLHint.

| nx-htmlhint Version | Nx Version | HTMLHint Version | | --------------------- | ---------------------- | ---------------------- | | ^17.0.0 \|\| ^18.0.0| ^17.0.0 \|\| ^18.0.0 | ^1.1.4 |