{"id":15671801,"url":"https://github.com/ikatyang/gulp-plugin-prettier","last_synced_at":"2025-09-09T06:10:39.424Z","repository":{"id":40792657,"uuid":"98086684","full_name":"ikatyang/gulp-plugin-prettier","owner":"ikatyang","description":"Gulp plugin to format code with Prettier","archived":false,"fork":false,"pushed_at":"2024-05-16T17:21:10.000Z","size":651,"stargazers_count":4,"open_issues_count":16,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T07:35:47.547Z","etag":null,"topics":["gulp","gulp-plugin","prettier"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikatyang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-23T09:09:41.000Z","updated_at":"2024-05-20T02:37:13.000Z","dependencies_parsed_at":"2024-06-19T05:28:59.413Z","dependency_job_id":"9b615292-87d1-4a57-8c7c-5f7731d69a88","html_url":"https://github.com/ikatyang/gulp-plugin-prettier","commit_stats":{"total_commits":207,"total_committers":5,"mean_commits":41.4,"dds":0.5603864734299517,"last_synced_commit":"05c36d4648543c26ae3ae7aaa51891d8550a8f11"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ikatyang/gulp-plugin-prettier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fgulp-plugin-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fgulp-plugin-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fgulp-plugin-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fgulp-plugin-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikatyang","download_url":"https://codeload.github.com/ikatyang/gulp-plugin-prettier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikatyang%2Fgulp-plugin-prettier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269687935,"owners_count":24459393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","gulp-plugin","prettier"],"created_at":"2024-10-03T15:20:24.420Z","updated_at":"2025-08-10T06:36:53.114Z","avatar_url":"https://github.com/ikatyang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-plugin-prettier\n\n[![npm](https://img.shields.io/npm/v/gulp-plugin-prettier.svg)](https://www.npmjs.com/package/gulp-plugin-prettier)\n[![build](https://img.shields.io/travis/ikatyang/gulp-plugin-prettier/master.svg)](https://travis-ci.org/ikatyang/gulp-plugin-prettier/builds)\n[![coverage](https://img.shields.io/codecov/c/github/ikatyang/gulp-plugin-prettier/master.svg)](https://codecov.io/gh/ikatyang/gulp-plugin-prettier)\n\nGulp plugin to format code with [Prettier](https://github.com/prettier/prettier)\n\n[Changelog](https://github.com/ikatyang/gulp-plugin-prettier/blob/master/CHANGELOG.md)\n\n## Install\n\n```sh\n# using npm\nnpm install --save-dev gulp-plugin-prettier gulp prettier\n\n# using yarn\nyarn add --dev gulp-plugin-prettier gulp prettier\n```\n\n**NOTE**: For TypeScript user, you have to install `@types/prettier` to get full types.\n\n## Usage\n\n(gulpfile.ts)\n\n```ts\nimport * as gulp from 'gulp';\nimport * as prettier from 'gulp-plugin-prettier';\n\n// replace unformatted with formatted\nfunction format() {\n  return gulp.src(['./src/**/*.ts', './gulpfile.ts'])\n    .pipe(prettier.format({ singleQuote: true }))\n    .pipe(gulp.dest(file =\u003e file.base));\n}\n\n// throw error if there is unformatted file\nfunction format_check() {\n  return gulp.src(['./src/**/*.ts', './gulpfile.ts'])\n    .pipe(\n      prettier.format({ singleQuote: true }, { reporter: prettier.Reporter.Error }),\n    );\n}\n```\n\n(gulpfile.js)\n\n```ts\nconst gulp = require('gulp');\nconst prettier = require('gulp-plugin-prettier');\n\n// replace unformatted with formatted\nfunction format() {\n  return gulp.src(['./src/**/*.js', './gulpfile.js'])\n    .pipe(prettier.format({ singleQuote: true }))\n    .pipe(gulp.dest(file =\u003e file.base));\n}\n\n// throw error if there is unformatted file\nfunction format_check() {\n  return gulp.src(['./src/**/*.js', './gulpfile.js'])\n    .pipe(prettier.format({ singleQuote: true }, { reporter: 'error' }));\n}\n```\n\n## API\n\n[Prettier Options](https://github.com/prettier/prettier#options)\n\n```ts\nexport function format(prettier_options?: PrettierOptions, plugin_options?: PluginOptions): stream.Transform;\n\nexport interface PluginOptions {\n  /**\n   * default: 'warning'\n   * report the filenames of files that are different from Prettier formatting\n   */\n  reporter?: Reporter | CustomReporter;\n  /**\n   * default: false\n   * omit formatted files\n   */\n  filter?: boolean;\n  /**\n   * default: true\n   * include rules from Prettier config files, e.g. .prettierrc\n   */\n  configFile?: boolean;\n}\n\nexport const enum Reporter {\n  /**\n   * do nothing\n   */\n  None = 'none',\n  /**\n   * throw error for the filenames of files that are different from Prettier formatting\n   */\n  Error = 'error',\n  /**\n   * print warning for the filenames of files that are different from Prettier formatting\n   */\n  Warning = 'warning'\n}\n\nexport type CustomReporter = (filename: string, different: boolean) =\u003e void;\n```\n\n## Development\n\n```sh\n# lint\nyarn run lint\n\n# format\nyarn run format\n\n# build\nyarn run build\n\n# test\nyarn run test\n```\n\n## Related\n\n- [gulp-prettier](https://github.com/bhargavrpatel/gulp-prettier)\n- [gulp-nf-prettier](https://github.com/btholt/gulp-nf-prettier)\n- [gulp-prettier-plugin](https://github.com/GAumala/gulp-prettier-plugin)\n- [@bdchauvette/gulp-prettier](https://github.com/bdchauvette/gulp-prettier)\n\n## License\n\nMIT © [Ika](https://github.com/ikatyang)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikatyang%2Fgulp-plugin-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikatyang%2Fgulp-plugin-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikatyang%2Fgulp-plugin-prettier/lists"}