From 19cd7d32278e0bc6ddab92e8c23bb8f682fa691f Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 6 Jul 2017 11:13:52 -0700 Subject: [PATCH] Add pre-commit metadata directly to prettier (#2414) --- .pre-commit-hooks.yaml | 5 +++++ README.md | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .pre-commit-hooks.yaml diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 00000000..d252abb3 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,5 @@ +- id: prettier + name: prettier + entry: prettier --write + language: node + types: [javascript] diff --git a/README.md b/README.md index 71d00b4a..52f65962 100644 --- a/README.md +++ b/README.md @@ -318,19 +318,18 @@ See https://github.com/okonet/lint-staged#configuration for more details about h ##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit) -Copy the following config in your pre-commit config yaml file: +Copy the following config into your `.pre-commit-config.yaml` file: ```yaml - - repo: https://github.com/awebdeveloper/pre-commit-prettier + - repo: https://github.com/prettier/prettier sha: '' # Use the sha or tag you want to point at hooks: - id: prettier - additional_dependencies: ['prettier@1.4.2'] - ``` +``` -Find more info from [here](https://github.com/awebdeveloper/pre-commit-prettier). +Find more info from [here](http://pre-commit.com). ##### Option 3. bash script