1.0.2 • Published 6 years ago

prettier-pre-commit v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Prettier-pre-commit

This script is designed to be run as a pre-commit hook.

When run, this script goes over all staged files, and runs prettier on them. Prettier configuration may be provided in the standard config files (e.g. package.json).

When a file is changed by prettier, and is fully staged, the file is changed on disk and in the index (cache).

When a file is changed by prettier, but was only partially staged (e.g. when committing only a specific line), the file is only changed in the index - the file on disk remains as is to avoid overriding changes.

Supported file types

Only the following extensions are currently supported, and they use their matching prettier parser:

*.js: babylon
*.jsx: babylon
*.ts: typescript
*.json: json
*.md: markdown
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago