From 87cd34b5b2432a1191145c028ef527b056d5eb9b Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 25 Jun 2022 16:05:01 -0400 Subject: [PATCH 1/2] chore: add label-commenter bot for formatting issues --- .github/label-commenter-config.yml | 16 ++++++++++++++++ .github/workflows/label-commenter.yml | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/label-commenter-config.yml create mode 100644 .github/workflows/label-commenter.yml diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml new file mode 100644 index 000000000000..c4701e01d93c --- /dev/null +++ b/.github/label-commenter-config.yml @@ -0,0 +1,16 @@ +comment: + footer: Please do not respond to this message. Thanks! 💖 + header: 🤖 Beep boop, hello! + +labels: + - name: formatting + labeled: + issue: + body: | + I'm the ⚡ TypeScript ESLint Formatting Bot ⚡, and I'm popping in automatically to advertise that we **strongly recommend against using ESLint rules for formatting purposes**. + + * [ESLint core has not accepted new stylistic rules for years](https://eslint.org/blog/2020/05/changes-to-rules-policies#what-are-the-changes) + * Formatting rules are inherently difficult to maintain and will not catch many edge cases _(todo: docs link pending #4907)_ + * Dedicated formatting tools such as [Prettier](https://prettier.io) are much faster, more stable, and more comprehensive than ESLint can ever be for formatting. + + This message is automated and serves only as a reminder. We will still triage your issue and, as long as it only involves fixing existing formatting rules, do not plan on automatically closing it. diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.yml new file mode 100644 index 000000000000..7f1429e46f55 --- /dev/null +++ b/.github/workflows/label-commenter.yml @@ -0,0 +1,18 @@ +name: Label Commenter + +on: + issues: + types: [labeled] + pull_request_target: + types: [labeled] + +permissions: + contents: read + issues: write + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: peaceiris/actions-label-commenter@v1 From c62c22b75fa9303b7908415ebb7abdecdf049e53 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 25 Jun 2022 16:33:44 -0400 Subject: [PATCH 2/2] Update link --- .github/label-commenter-config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml index c4701e01d93c..f9246561995b 100644 --- a/.github/label-commenter-config.yml +++ b/.github/label-commenter-config.yml @@ -9,8 +9,6 @@ labels: body: | I'm the ⚡ TypeScript ESLint Formatting Bot ⚡, and I'm popping in automatically to advertise that we **strongly recommend against using ESLint rules for formatting purposes**. - * [ESLint core has not accepted new stylistic rules for years](https://eslint.org/blog/2020/05/changes-to-rules-policies#what-are-the-changes) - * Formatting rules are inherently difficult to maintain and will not catch many edge cases _(todo: docs link pending #4907)_ - * Dedicated formatting tools such as [Prettier](https://prettier.io) are much faster, more stable, and more comprehensive than ESLint can ever be for formatting. + See our **[What About Formatting? docs page](https://typescript-eslint.io/docs/linting/troubleshooting/formatting)** for more info. This message is automated and serves only as a reminder. We will still triage your issue and, as long as it only involves fixing existing formatting rules, do not plan on automatically closing it.