# gulp-prettier

> Format files with Prettier

Latest version **7.0.0** (published 2026-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-prettier
pnpm add gulp-prettier
yarn add gulp-prettier
bun add gulp-prettier
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2026-07-17 |
| First published | 2017-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=24 |
| Dependencies | 2 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 24 |
| Author | Thomas Vantuycom |
| Maintainers | thomasvantuycom |
| Keywords | gulp, prettier, gulp-prettier, gulpplugin |

## Links

- npm: https://www.npmjs.com/package/gulp-prettier
- Repository: https://github.com/thomasvantuycom/gulp-prettier
- Homepage: https://github.com/thomasvantuycom/gulp-prettier#readme
- Issues: https://github.com/thomasvantuycom/gulp-prettier/issues
- npm.io page: https://npm.io/package/gulp-prettier

## Dependencies (2)

- [prettier](https://npm.io/package/prettier.md) ^3.9.5
- [plugin-error](https://npm.io/package/plugin-error.md) ^2.0.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 7.0.0 (latest) — 2026-07-17
- 6.0.0 — 2023-11-03
- 5.0.0 — 2023-07-05
- 4.0.0 — 2021-07-31
- 3.0.0 — 2020-03-21
- 2.3.0 — 2019-11-11
- 2.2.0 — 2019-10-21
- 2.1.0 — 2019-02-01
- 2.0.0 — 2018-05-01
- 1.1.0 — 2017-01-16
- 1.0.0 — 2017-01-15

## README

# gulp-prettier 

> Format files with [Prettier](https://github.com/prettier/prettier)

[![GitHub Workflow Status](https://github.com/TheDancingCode/gulp-prettier/actions/workflows/ci.yml/badge.svg)](https://github.com/thomasvantuycom/gulp-prettier/actions/workflows/ci.yml) [![npm version](https://img.shields.io/npm/v/gulp-prettier.svg)](https://www.npmjs.com/package/gulp-prettier) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

## Install

```sh
npm install gulp-prettier --save-dev
```

## Usage

```js
import gulp from 'gulp';
import prettier from 'gulp-prettier';

function format() {
  return gulp.src('src/*.js')
    .pipe(prettier({ singleQuote: true }))
    .pipe(gulp.dest('dist'));
}

export default format;
```

To check whether or not your files adhere to Prettier's formatting, use `prettier.check`. This can be used as a validation step in CI scenarios.

```js
import gulp from 'gulp';
import prettier from 'gulp-prettier';

function validate() {
  return gulp.src('dist/*.js')
    .pipe(prettier.check({ singleQuote: true }));
}

export default validate;
```

## API

### prettier(?options)

Formats your files using Prettier.

#### options

Type: `Object`

Consult the Prettier [options](https://prettier.io/docs/en/options.html).

`editorconfig: true` can also be passed to enable [EditorConfig support](https://prettier.io/docs/en/api.html#prettierresolveconfigfilepath--options).

### prettier.check(?options)

Checks if your files have been formatted with Prettier and, if not, throws an error with a list of unformatted files. This is useful for running Prettier in CI scenarios.

#### options

Type: `Object`

Consult the Prettier [options](https://prettier.io/docs/en/options.html).

`editorconfig: true` can also be passed to enable [EditorConfig support](https://prettier.io/docs/en/api.html#prettierresolveconfigfilepath--options).

## License

MIT © [Thomas Vantuycom](https://github.com/thomasvantuycom)

---
_Source: https://npm.io/package/gulp-prettier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
