CSSHint is a Node.js-based CSS code review tool that lints CSS files for style consistency and errors. Current stable version 0.3.4, with an unknown release cadence (last update appears sporadic). It is built on PostCSS and supports rules from the ecomfe CSS style spec as well as CSSLint rules. Key differentiators: integration with global counters for project-wide consistency checks (hex color case, font-family case), and a promise-based API for file content checking.
npm install csshintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to lint a CSS string using the checkString function, handling the promise result with warning messages.
Avoid concurrent lint operations; reset globals between runs if needed.
Use the Node.js API instead of CLI for consistent behavior.
Use import { checkString } from 'csshint' instead of import csshint from 'csshint'.Run npm install postcss as a dependency of your project.