A CLI tool to lint BEM component isolation in CSS/SCSS files, currently at version 2.0.0-beta.8. It enforces two main rules: a CSS block file should only contain its own classes, and a CSS file should not style classes from another block. This helps maintain modularity in large-scale CSS projects. The tool supports configuration via JSON files, including options for sources, exclusions, snapshots, lower-case checks, class prefixes, file patterns, and module overrides. It requires Node.js >=6 and is published under the MIT license. Compared to other linters, bemlinter focuses specifically on BEM methodology and isolation, rather than general CSS quality or formatting.
npm install bemlinterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows programmatic usage of the lint function with configuration options.
Pin to exact version and monitor for stable releases.
Always provide a path like 'bemlinter lint *.scss'.
Only enable snapshot if you understand its purpose and have read the docs.
Migrate your bemlinter.json to the new format; see migration guide in docs.
Run 'npm install bemlinter --save-dev' in your project.
Replace 'import bemlinter from "bemlinter"' with 'const bemlinter = require("bemlinter")'.Verify the glob pattern or path; e.g., 'bemlinter lint src/**/*.scss'.
No dependency data recorded yet.