Registry / devops / gulp-eslint-if-fixed

gulp-eslint-if-fixed

JSON →
library1.0.0jsnpmunverified

A Gulp plugin helper that filters files that were fixed by ESLint's fix option, allowing you to write fixed files back to source. Current version 1.0.0, no release cadence. Differentiates from plain gulp-eslint by providing a way to only output files that were actually modified during linting, enabling a streamlined fix pipeline without manual change detection.

npm install gulp-eslint-if-fixed
INSTALL
IMPORT
SIG · GULP-ESLINT-IF-FIX
G
gulp-eslint-if-fixed
devopsjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

eslintIfFixed
const eslintIfFixed = require('gulp-eslint-if-fixed')
import eslintIfFixed from 'gulp-eslint-if-fixed'
Package is CommonJS only, no ESM exports.
default
const eslintIfFixed = require('gulp-eslint-if-fixed')
const { eslintIfFixed } = require('gulp-eslint-if-fixed')
Module exports the function directly, not as a named export.

Demonstrates a Gulp task that lints JavaScript files with ESLint's fix option, formats results, and writes only the fixed files back to the source directory.

const gulp = require('gulp'); const eslint = require('gulp-eslint'); const eslintIfFixed = require('gulp-eslint-if-fixed'); gulp.task('lint-fix', function() { return gulp.src('src/*.js') .pipe(eslint({ fix: true })) .pipe(eslint.format()) .pipe(eslintIfFixed('src')); });
Debug
Known issues
gotchaThe plugin does not work with the async/await or promise-based Gulp APIs (gulp 4+). It expects streams.
fix
Ensure you are using gulp.src() with stream mode; avoid using gulp.lastRun or async functions.
affects: >=1.0.0
gotchaThe 'src' argument passed to eslintIfFixed must match the base directory of your Gulp source files, else fixed files may be written to incorrect paths.
fix
Use gulp.src with {base: '.'} or the same base as expected by eslintIfFixed.
affects: >=1.0.0
deprecatedPackage has not been updated since 2016 and may not work with newer versions of ESLint or Gulp.
fix
Consider using gulp-eslint's built-in 'fix' feature or updating to a more maintained alternative.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: eslintIfFixed is not a function
Importing the module incorrectly (e.g., as a named export or using ES import).
fix
Use const eslintIfFixed = require('gulp-eslint-if-fixed');
Error: write after end
Using the plugin with a stream that has already ended, often due to asynchronous processing.
fix
Ensure the plugin is placed after eslint({fix:true}) and not in a branch or after a destructive pipe.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
gulprequiredPeers with Gulp to integrate into task pipeline
eslintrequiredWorks as a post-processing step after gulp-eslint fix
Agent activity
4 hits · last 30 days
node
4
Resources
gulp-eslint-if-fixed — npm install gulp-eslint-if-fixed · libregistry