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'));
Errors
Common errors & fixes
TypeError: bemlinter(...).pipe is not a function
Calling bemlinter() without require correctly
fixEnsure proper require: const bemlinter = require('gulp-bemlinter'); Error: Cannot find module 'bemlinter'
Missing dependency bemlinter
fixRun: npm install bemlinter
Upgrade
Version history
2.0.0-beta.3latest on npm
Audit
Dependencies
bemlinterrequiredCore linting logic is provided by the bemlinter package