Files
test-repo/.pre-commit-hooks.yaml
T
Jonathan Morley 5ccb1b44ab fix: configure pre-commit hook to only output changed files (#7129)
Currently, the pre-commit hook will output all files that prettier analyzes.

The changed lines are highlighted in the terminal, but this highlighting is not always successful (e.g. we have seen the highlighting disappear when running inside Jenkins)

This sets prettier (when running within pre-commit) to only output changed files
2020-06-24 15:11:31 +03:00

17 lines
265 B
YAML

- id: prettier
name: prettier
entry: prettier --write --list-different
language: node
files: "\\.(\
css|less|scss\
|graphql|gql\
|html\
|js|jsx\
|json\
|md|markdown|mdown|mkdn\
|mdx\
|ts|tsx\
|vue\
|yaml|yml\
)$"