From 6a6b0f1fc29f5fc1aa0b265d977960f3bbd3db78 Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Sat, 8 Aug 2020 14:18:07 +0200 Subject: [PATCH 1/7] Moved pre-commit support to github.com/prettier/pre-commit * Make current hook fail, * Updated docs to reflect the change. Closes #8925 --- .pre-commit-hooks.yaml | 19 +++++-------------- docs/precommit.md | 4 ++-- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 83519e34a39b..3b1208b64069 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,16 +1,7 @@ +# Remove this file after year 2020 + - 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\ - )$" + entry: Prettier support for pre-commit has been moved to https://github.com/prettier/pre-commit, please use the new repository. + language: fail + pass_filenames: false diff --git a/docs/precommit.md b/docs/precommit.md index 123d7279f0a7..366a6f4fd0c2 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/prettier/pre-commit 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 [prettier's repo dedicated to pre-commit](https://github.com/prettier/pre-commit) and the [pre-commit](https://pre-commit.com) website. ## Option 4. [git-format-staged](https://github.com/hallettj/git-format-staged) From 7b63207a05e45525308a8b2fd5fbd3ea2fe6e463 Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Sat, 8 Aug 2020 14:33:01 +0200 Subject: [PATCH 2/7] fixup! Moved pre-commit support to github.com/prettier/pre-commit --- changelog_unreleased/cli/pr-8937.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog_unreleased/cli/pr-8937.md diff --git a/changelog_unreleased/cli/pr-8937.md b/changelog_unreleased/cli/pr-8937.md new file mode 100644 index 000000000000..f8bb442fccb6 --- /dev/null +++ b/changelog_unreleased/cli/pr-8937.md @@ -0,0 +1 @@ +#### Move [pre-commit](https://github.com/pre-commit/pre-commit) support to github.com/prettier/pre-commit ([#8937](https://github.com/prettier/prettier/pull/8937) by [@FloChehab](https://github.com/FloChehab)) From 180fdd32889f04bbc4b52050f0be6bdb3972b0f5 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Wed, 21 Oct 2020 13:56:46 +0800 Subject: [PATCH 3/7] Update precommit.md --- docs/precommit.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/precommit.md b/docs/precommit.md index 8ca26af4557c..d5def2ecbc6c 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -62,7 +62,8 @@ Copy the following config into your `.pre-commit-config.yaml` file: ```yaml - repo: https://github.com/prettier/pre-commit - rev: "" # Use the sha or tag you want to point at + # Use the sha or branch you want to point at + rev: main hooks: - id: prettier ``` From afa68573d3cee84b6ec464e56197b6b287ab42fe Mon Sep 17 00:00:00 2001 From: sosukesuzuki Date: Fri, 6 Nov 2020 15:27:58 +0900 Subject: [PATCH 4/7] Remove pr-8937.md --- changelog_unreleased/cli/pr-8937.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog_unreleased/cli/pr-8937.md diff --git a/changelog_unreleased/cli/pr-8937.md b/changelog_unreleased/cli/pr-8937.md deleted file mode 100644 index f8bb442fccb6..000000000000 --- a/changelog_unreleased/cli/pr-8937.md +++ /dev/null @@ -1 +0,0 @@ -#### Move [pre-commit](https://github.com/pre-commit/pre-commit) support to github.com/prettier/pre-commit ([#8937](https://github.com/prettier/prettier/pull/8937) by [@FloChehab](https://github.com/FloChehab)) From f3775e19b6c47598326de60d13e33431f8975c1c Mon Sep 17 00:00:00 2001 From: fisker Date: Mon, 16 Nov 2020 18:10:47 +0800 Subject: [PATCH 5/7] Move to https://github.com/pre-commit/mirrors-prettier --- .pre-commit-hooks.yaml | 2 +- docs/precommit.md | 7 +++---- website/versioned_docs/version-stable/precommit.md | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3b1208b64069..510d631cbd69 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -2,6 +2,6 @@ - id: prettier name: prettier - entry: Prettier support for pre-commit has been moved to https://github.com/prettier/pre-commit, please use the new repository. + 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 d5def2ecbc6c..9cdd90e4a4fd 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -61,14 +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/pre-commit - # Use the sha or branch you want to point at - rev: main +- repo: https://github.com/pre-commit/mirrors-prettier + rev: "" # Use the sha or branch you want to point at hooks: - id: prettier ``` -Read more at [prettier's repo dedicated to pre-commit](https://github.com/prettier/pre-commit) and the [pre-commit](https://pre-commit.com) website. +Read more at [prettier's repo dedicated to 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..0fcfc147ae11 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 - rev: "" # Use the sha or tag you want to point at +- repo: https://github.com/pre-commit/mirrors-prettier + rev: "" # Use the sha or branch you want to point at hooks: - id: prettier ``` +Read more at [prettier's repo dedicated to 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) From a2c77e97404ecfee0bfa725a577704104310145b Mon Sep 17 00:00:00 2001 From: fisker Date: Mon, 16 Nov 2020 18:13:04 +0800 Subject: [PATCH 6/7] Use tag --- docs/precommit.md | 2 +- website/versioned_docs/version-stable/precommit.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/precommit.md b/docs/precommit.md index 9cdd90e4a4fd..8d4fbdad9784 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -62,7 +62,7 @@ Copy the following config into your `.pre-commit-config.yaml` file: ```yaml - repo: https://github.com/pre-commit/mirrors-prettier - rev: "" # Use the sha or branch you want to point at + rev: "" # Use the sha or tag you want to point at hooks: - id: prettier ``` diff --git a/website/versioned_docs/version-stable/precommit.md b/website/versioned_docs/version-stable/precommit.md index 0fcfc147ae11..c9cec2160f70 100644 --- a/website/versioned_docs/version-stable/precommit.md +++ b/website/versioned_docs/version-stable/precommit.md @@ -63,7 +63,7 @@ Copy the following config into your `.pre-commit-config.yaml` file: ```yaml - repo: https://github.com/pre-commit/mirrors-prettier - rev: "" # Use the sha or branch you want to point at + rev: "" # Use the sha or tag you want to point at hooks: - id: prettier ``` From e17e2362440baa19ad85e961003caa4d9040950a Mon Sep 17 00:00:00 2001 From: fisker Date: Mon, 16 Nov 2020 18:21:38 +0800 Subject: [PATCH 7/7] Update link name --- docs/precommit.md | 2 +- website/versioned_docs/version-stable/precommit.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/precommit.md b/docs/precommit.md index 8d4fbdad9784..66f32326ada9 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -67,7 +67,7 @@ Copy the following config into your `.pre-commit-config.yaml` file: - id: prettier ``` -Read more at [prettier's repo dedicated to pre-commit](https://github.com/pre-commit/mirrors-prettier) and 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 c9cec2160f70..4a0d7a6a7259 100644 --- a/website/versioned_docs/version-stable/precommit.md +++ b/website/versioned_docs/version-stable/precommit.md @@ -68,7 +68,7 @@ Copy the following config into your `.pre-commit-config.yaml` file: - id: prettier ``` -Read more at [prettier's repo dedicated to pre-commit](https://github.com/pre-commit/mirrors-prettier) and 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. Read more at the [pre-commit](https://pre-commit.com) website.