From ed49bf10a00dde513679576e2a4abe04fb2eac73 Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Mon, 16 Nov 2020 11:27:34 +0100 Subject: [PATCH] Moved pre-commit support to github.com/pre-commit/mirrors-prettier (#8937) Co-authored-by: fisker Cheung Co-authored-by: sosukesuzuki --- .pre-commit-hooks.yaml | 7 +++++-- docs/precommit.md | 4 ++-- website/versioned_docs/version-stable/precommit.md | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index ac74494a227e..510d631cbd69 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,4 +1,7 @@ +# Remove this file after year 2020 + - id: prettier name: prettier - entry: prettier --write --list-different --ignore-unknown - language: node + entry: Prettier support for pre-commit has been moved to https://github.com/pre-commit/mirrors-prettier, please use the new repository. + language: fail + pass_filenames: false diff --git a/docs/precommit.md b/docs/precommit.md index 24627270f42c..66f32326ada9 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -61,13 +61,13 @@ Read more at the [pretty-quick](https://github.com/azz/pretty-quick) repo. Copy the following config into your `.pre-commit-config.yaml` file: ```yaml -- repo: https://github.com/prettier/prettier +- repo: https://github.com/pre-commit/mirrors-prettier rev: "" # Use the sha or tag you want to point at hooks: - id: prettier ``` -Read more at the [pre-commit](https://pre-commit.com) website. +Read more at [mirror of prettier package for pre-commit](https://github.com/pre-commit/mirrors-prettier) and the [pre-commit](https://pre-commit.com) website. ## Option 4. [git-format-staged](https://github.com/hallettj/git-format-staged) diff --git a/website/versioned_docs/version-stable/precommit.md b/website/versioned_docs/version-stable/precommit.md index 9ea0cf8fe75c..4a0d7a6a7259 100644 --- a/website/versioned_docs/version-stable/precommit.md +++ b/website/versioned_docs/version-stable/precommit.md @@ -62,12 +62,14 @@ Read more at the [pretty-quick](https://github.com/azz/pretty-quick) repo. Copy the following config into your `.pre-commit-config.yaml` file: ```yaml -- repo: https://github.com/prettier/prettier +- repo: https://github.com/pre-commit/mirrors-prettier rev: "" # Use the sha or tag you want to point at hooks: - id: prettier ``` +Read more at [mirror of prettier package for pre-commit](https://github.com/pre-commit/mirrors-prettier) and the [pre-commit](https://pre-commit.com) website. + Read more at the [pre-commit](https://pre-commit.com) website. ## Option 4. [git-format-staged](https://github.com/hallettj/git-format-staged)