From 2b58107ed76a909bf035c75bc90f999a111b830d Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Sat, 25 Sep 2021 20:35:12 +0700 Subject: [PATCH 1/2] Add template to propose new rules --- .../eslint-plugin-typescript.yml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml diff --git a/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml b/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml new file mode 100644 index 000000000000..3fdd3bbee69c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml @@ -0,0 +1,38 @@ +name: Rule proposal +description: Propose a new rule for the '@typescript-eslint/eslint-plugin' package +labels: + - 'enhancement: new base rule extension' + - 'package: eslint-plugin' + - triage +body: + - type: markdown + attributes: + value: | + Before opening a new issue: + - Look for existing [open or closed rule proposals](https://github.com/typescript-eslint/typescript-eslint/issues?q=label%3A%22enhancement%3A+new+base+rule+extension%22) + - Look for [existing rules](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) + - Ensure that the rule you want to propose is related to types. If not, consider looking into [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) +- type: textarea + attributes: + label: Description + description: Explain here why this rule would be beneficial + validations: + required: true + - type: textarea + attributes: + label: Fail + description: Specify an example of code that should be detected + value: | + ```ts + var replace = 'me'; + ``` + - type: input + attributes: + label: Pass + description: Specify an example of code that would be accepted in its place + value: | + ```ts + const replace = 'me'; + ``` + validations: + required: true From ef691f0d0755c7657ab24d78514e089519acab27 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Sat, 25 Sep 2021 20:37:54 +0700 Subject: [PATCH 2/2] Prefill title --- .../eslint-plugin-typescript.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml b/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml index 3fdd3bbee69c..36ab5d7985f9 100644 --- a/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml +++ b/.github/ISSUE_TEMPLATE/eslint-plugin-typescript.yml @@ -1,8 +1,9 @@ name: Rule proposal -description: Propose a new rule for the '@typescript-eslint/eslint-plugin' package +description: "Propose a new rule for the '@typescript-eslint/eslint-plugin' package" +title: "Rule proposal: " labels: - - 'enhancement: new base rule extension' - - 'package: eslint-plugin' + - "enhancement: new base rule extension" + - "package: eslint-plugin" - triage body: - type: markdown @@ -12,13 +13,15 @@ body: - Look for existing [open or closed rule proposals](https://github.com/typescript-eslint/typescript-eslint/issues?q=label%3A%22enhancement%3A+new+base+rule+extension%22) - Look for [existing rules](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) - Ensure that the rule you want to propose is related to types. If not, consider looking into [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) -- type: textarea + - type: textarea + validations: + required: true attributes: label: Description description: Explain here why this rule would be beneficial + - type: textarea validations: required: true - - type: textarea attributes: label: Fail description: Specify an example of code that should be detected @@ -26,7 +29,9 @@ body: ```ts var replace = 'me'; ``` - - type: input + - type: textarea + validations: + required: true attributes: label: Pass description: Specify an example of code that would be accepted in its place @@ -34,5 +39,3 @@ body: ```ts const replace = 'me'; ``` - validations: - required: true