Gulp plugin (v1.3.0, last release 2019) to format source code with Prettier. Requires Prettier >=1.x as a peer dependency. Key differentiator: supports filter mode (only emit files needing formatting) and validate mode (fail CI if files unformatted). Alternative to gulp-prettier with more granular control. Ships TypeScript definitions. Minimalist API with two optional config objects (prettier options and plugin options).
npm install gulp-prettier-pluginVerified import paths — ran on the pinned version, not inferred.
Gulp task that formats JS files in place, using filter to only rewrite files that need formatting.
Consider using gulp-prettier (v4+) or use prettier directly.
Set filter to false if you need to pipe output to other plugins (e.g., linter) for all files.
Use `.pipe(gulp.dest(file => file.base))` instead of `.pipe(gulp.dest('./'))`.Double-check Prettier option names and values.
Use default import: import prettierPlugin from 'gulp-prettier-plugin' or const prettierPlugin = require('gulp-prettier-plugin').Run: npm install prettier --save-dev
Change .pipe(gulp.dest('./')) to .pipe(gulp.dest(file => file.base)).