Registry / testing / gulp-bemlinter

gulp-bemlinter

JSON →
library2.0.0-beta.3jsnpmunverified

A Gulp plugin to lint BEM component isolation in CSS/SCSS files. Version 2.0.0-beta.3, moderate release cadence. Wraps the base bemlinter package. Differentiators: specifically targets BEM methodology violations in SCSS files, integrates with Gulp task runners.

npm install gulp-bemlinter
INSTALL
IMPORT
SIG · GULP-BEMLINTER
G
gulp-bemlinter
testingjavascriptv2.0.0-beta.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gulp-bemlinter plugin (default import)
const bemlinter = require('gulp-bemlinter');
import bemlinter from 'gulp-bemlinter';
This package is CommonJS; ESM import may require workaround.
bemlinter()
.pipe(bemlinter())
.pipe(bemlinter.init())
The plugin function is invoked directly without .init()
bemlinter.format()
.pipe(bemlinter.format())
.pipe(bemlinter.formatter())
Use .format() not .formatter()
bemlinter.failOnError()
.pipe(bemlinter.failOnError())
.pipe(bemlinter.failOnError)
failOnError is a function; must be called.

Shows basic Gulp task using gulp-bemlinter to lint SCSS files, format results, and fail on errors.

const gulp = require('gulp'); const bemlinter = require('gulp-bemlinter'); gulp.task('lint', () => { return gulp.src('styles/**/*.scss') .pipe(bemlinter()) .pipe(bemlinter.format()) .pipe(bemlinter.failOnError()); }); gulp.task('default', gulp.series('lint'));
Debug
Known issues
deprecatedgulp-bemlinter is a wrapper around the deprecated bemlinter package
fix
Consider migrating to a maintained linter like stylelint
affects: >=2.0.0-beta.3
breakingBreaking changes: 2.0.0-beta versions may have unstable API
fix
Pin to exact version or use 1.x
affects: 2.0.0-beta.*
gotchaRequires SCSS files; CSS-only files may not be analyzed correctly
fix
Ensure file extensions are .scss
affects: all
Errors
Common errors & fixes
TypeError: bemlinter(...).pipe is not a function
Calling bemlinter() without require correctly
fix
Ensure proper require: const bemlinter = require('gulp-bemlinter');
Error: Cannot find module 'bemlinter'
Missing dependency bemlinter
fix
Run: npm install bemlinter
Upgrade
Version history
2.0.0-beta.3latest on npm
Audit
Dependencies
bemlinterrequiredCore linting logic is provided by the bemlinter package
Agent activity
4 hits · last 30 days
node
4
Resources
gulp-bemlinter — npm install gulp-bemlinter · libregistry