{"id":20731660,"url":"https://github.com/bgotink/express-check-in","last_synced_at":"2025-07-18T17:06:02.894Z","repository":{"id":48115905,"uuid":"371523966","full_name":"bgotink/express-check-in","owner":"bgotink","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-07T19:35:21.000Z","size":4596,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-14T07:15:06.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bgotink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2021-05-27T23:01:06.000Z","updated_at":"2023-03-02T21:16:29.000Z","dependencies_parsed_at":"2023-12-11T17:28:13.904Z","dependency_job_id":"0a32b8b4-b849-4b62-a646-4151117fc0c3","html_url":"https://github.com/bgotink/express-check-in","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bgotink/express-check-in","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Fexpress-check-in","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Fexpress-check-in/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Fexpress-check-in/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Fexpress-check-in/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgotink","download_url":"https://codeload.github.com/bgotink/express-check-in/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgotink%2Fexpress-check-in/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265798365,"owners_count":23829930,"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","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":[],"created_at":"2024-11-17T05:16:18.435Z","updated_at":"2025-07-18T17:06:02.874Z","avatar_url":"https://github.com/bgotink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `express-check-in`\n\n[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![npm](https://img.shields.io/npm/v/express-check-in.svg?style=flat-square)](https://npmjs.org/@bgotink/express-check-in)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE.md)\n\n\u003e Validate and fixup code at check-in\n\n## Install\n\nWith `yarn`:\n\n```shellsession\nyarn add --dev prettier express-check-in\n```\n\nWith `npm`:\n\n```shellsession\nnpm install --save-dev prettier express-check-in\n```\n\n## Usage\n\nWith `yarn`:\n\n```shellsession\nyarn express-check-in\n```\n\nWith [`npx`](https://npm.im/npx):\n\n```shellsession\nnpx -p prettier@latest -p express-check-in express-check-in\n```\n\n\u003e Note: You can (_should_) change `latest` to a specific version of Prettier.\n\nWith `npm`:\n\n```shellsession\nnpm exec express-check-in\n```\n\n## Plugins\n\nThe express-check-in command has a plugin-based architecture. There are two built-in plugins, `prettier` and `cspell`. Both of these are by default enabled if the required dependency is installed (respectively the `prettier` and `cspell-lib` packages).\n\nTo do:\n\n- Write documentation on how to write your own plugins\n- Load 3rd party plugins automatically?\n- Provide `eslint --fix` plugin?\n\n## Pre-Commit Hook\n\nYou can run `express-check-in` as a pre-commit hook using [`husky`](https://github.com/typicode/husky).\n\n```shellsession\nyarn add --dev husky\nyarn husky add .husky/pre-commit \"yarn express-check-in --staged\"\n```\n\n## CLI Flags\n\n### `--staged`\n\nPre-commit mode. Under this flag only staged files will be formatted, and they will be re-staged after formatting.\n\nPartially staged files will be re-staged after formatting, but the files on disk will not be updated to reflect these changes. This prevents conflicts between the unstaged changes and the changes made by express-check-in.\n\n### `--pattern`\n\nFilters the files for the given [micromatch](https://github.com/micromatch/micromatch) pattern.  \nFor example `express-check-in --pattern \"**/*.*(js|jsx)\"` or `express-check-in --pattern \"**/*.js\" --pattern \"**/*.jsx\"`\n\n### `--plugin`\n\nExplicitly pass what plugins to use, e.g.\n\n```shellsession\nexpress-check-in --plugin prettier\n```\n\nwill only use the `prettier` builtin plugin, even if the `cspell` builtin plugin could also be loaded.\n\n### `--verbose`\n\nOutputs the name of each file right before it is processed. This can be useful if Prettier throws an error and you can't identify which file is causing the problem.\n\n### `--bail`\n\nPrevent `git commit` if any files are fixed.\n\n### `--check`\n\nCheck that files are correctly formatted, but don't format them. This is useful on CI to verify that all changed files in the current branch were correctly formatted.\n\n### `--no-resolve-config`\n\nDo not resolve prettier config when determining which files to format, just use standard set of supported file types \u0026 extensions prettier supports. This may be useful if you do not need any customization and see performance issues.\n\nBy default, express-check-in will check your prettier configuration file for any overrides you define to support formatting of additional file extensions.\n\nExample `.prettierrc` file to support formatting files with `.cmp` or `.page` extensions as html.\n\n```\n{\n    \"printWidth\": 120,\n    \"bracketSpacing\": false,\n    \"overrides\": [\n        {\n            \"files\": \"*.{cmp,page}\",\n            \"options\": {\"parser\": \"html\"}\n        }\n    ],\n}\n```\n\n## Project\n\nThis project started as a fork of [`pretty-quick`](https://github.com/azz/pretty-quick). Some functionality, e.g. mercurial support, is removed to make it possible to restage partially staged files. The prettier-only implementation is expanded to also support other checks, such as spell checking via `cspell`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgotink%2Fexpress-check-in","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgotink%2Fexpress-check-in","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgotink%2Fexpress-check-in/lists"}