Registry / testing / gulp-nf-prettier

gulp-nf-prettier

JSON →
library3.0.0jsnpmunverified

A Gulp plugin to format code using Prettier, forked from gulp-prettier with Netflix-specific requirements. Current stable version is 6.0.0 (pure ESM, Node 18+). Prettier is a peer dependency, allowing independent upgrades. Key differentiators: supports editorconfig, includes a `check` method for CI (errors on unformatted files), and offers options like `printWidth`, `parser`, `singleQuote`. Successor to v3.0.0 (Prettier v2) and v5.0.0 (Prettier v3). Alternative to gulp-prettier.

npm install gulp-nf-prettier
INSTALL
IMPORT
SIG · GULP-NF-PRETTIER
G
gulp-nf-prettier
testingjavascriptv3.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.

default
import prettier from 'gulp-nf-prettier'
const prettier = require('gulp-nf-prettier')
ESM-only since v6.0.0. CommonJS require will fail.
prettier
import prettier from 'gulp-nf-prettier'
import { prettier } from 'gulp-nf-prettier'
The package exports a single default function. Named export does not exist.
gulp-nf-prettier options
prettier({ check: true, parser: 'babel' })
prettier.check({ parser: 'babel' })
The check option is passed via the options object, not called as a separate method.

Demonstrates basic formatting task with gulp-nf-prettier, applying Prettier options and writing files back.

import gulp from 'gulp'; import prettier from 'gulp-nf-prettier'; export function format() { return gulp .src('src/**/*.js', { base: './' }) .pipe(prettier({ printWidth: 100, tabWidth: 2, singleQuote: true, trailingComma: 'es5', bracketSpacing: true, parser: 'babel' })) .pipe(gulp.dest('./')); }
Debug
Known issues
breakingRequires Node 18+. Dropped Node 12 and 14 in v5.0.0, Node 10 in v4.0.0.
fix
Upgrade Node.js to version 18 or later.
affects: >=5.0.0
breakingPure ESM since v6.0.0. CommonJS require() will throw.
fix
Use import syntax and ensure project is ESM (e.g., type: 'module' in package.json).
affects: >=6.0.0
breakingPrettier upgrade to v3.0.0 in v5.0.0 introduced breaking changes in Prettier's API and defaults.
fix
Review Prettier 3.0 migration guide. Options like trailingComma may need updating.
affects: >=5.0.0
breakingUpgrade to Prettier v2.0.0 in v3.0.0 dropped Node 4, 6, 8 support and included Prettier breaking changes.
fix
Ensure Node >=10 and review Prettier 2.0 breaking changes.
affects: >=3.0.0
deprecatedgulp-nf-prettier is a fork; original gulp-prettier may have different maintenance.
fix
Consider using the upstream gulp-prettier or other alternatives if Netflix-specific features aren't needed.
affects: all
gotchaPrettier is a peer dependency; must be installed separately.
fix
Run npm install prettier --save-dev.
affects: all
gotchaThe 'check' option errors on unformatted files; may break builds in CI if not expecting errors.
fix
Set check: false or handle build errors appropriately.
affects: all
Errors
Common errors & fixes
Cannot find module 'gulp-nf-prettier'
gulp-nf-prettier is a scoped or private fork; may not be published on npm.
fix
Install from GitHub: npm install https://github.com/bhargavrpatel/gulp-prettier
require() of ES Module not supported
Using CommonJS require() with v6.0.0+ (pure ESM).
fix
Switch to import syntax or downgrade to v5.0.0.
Error: Cannot find module 'prettier'
Peer dependency prettier not installed.
fix
Install prettier: npm install prettier --save-dev
TypeError: prettier is not a function
Trying to call a non-existent named export prettier.check() or using wrong import style.
fix
Use default import: import prettier from 'gulp-nf-prettier'
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
prettierrequiredpeer dependency required at runtime
Agent activity
8 hits · last 30 days
node
8
Resources
gulp-nf-prettier — npm install gulp-nf-prettier · libregistry