From 611c676dfd671013d81810724f184e2a9c5ad5d7 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Fri, 22 May 2020 10:25:21 -0700 Subject: [PATCH] Docs: Update new rules policies (#13343) * Docs: Update new rules policies * Update new rule issue template --- .github/ISSUE_TEMPLATE/NEW_RULE.md | 6 +++++- docs/developer-guide/contributing/new-rules.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/NEW_RULE.md b/.github/ISSUE_TEMPLATE/NEW_RULE.md index 86809ba1c16..31dfc8cb38b 100644 --- a/.github/ISSUE_TEMPLATE/NEW_RULE.md +++ b/.github/ISSUE_TEMPLATE/NEW_RULE.md @@ -24,11 +24,15 @@ assignees: '' **Please describe what the rule should do:** + +**What new ECMAScript feature does this rule relate to?** + + + **What category of rule is this? (place an "X" next to just one item)** [ ] Warns about a potential error (problem) [ ] Suggests an alternate way of doing something (suggestion) -[ ] Enforces code style (layout) [ ] Other (please specify:) **Provide 2-3 code examples that this rule will warn about:** diff --git a/docs/developer-guide/contributing/new-rules.md b/docs/developer-guide/contributing/new-rules.md index a3513773d24..e4a19e486f5 100644 --- a/docs/developer-guide/contributing/new-rules.md +++ b/docs/developer-guide/contributing/new-rules.md @@ -2,7 +2,7 @@ ESLint is all about rules. For most of the project's lifetime, we've had over 200 rules, and that list continues to grow. However, we can't just accept any proposed rule because all rules need to work cohesively together. As such, we have some guidelines around which rules can be part of the ESLint core and which are better off as custom rules and plugins. -**Note:** As of 2016, we accept only rules that are deemed extremely important for inclusion. We prefer that new rules be implemented in plugins. +**Note:** As of 2020, we only accept rules related to new ECMAScript features. We prefer that new rules be implemented in plugins. ## Core Rule Guidelines @@ -29,7 +29,7 @@ In order for a rule to be accepted in the ESLint core, it must: 1. Fulfill all the criteria listed in the "Core Rule Guidelines" section 1. Have an ESLint team member champion inclusion of the rule -1. Be very important for ESLint users because it either catches a serious problem or allows styling of code in accordance with a popular style guide +1. Be related to an ECMAScript feature that has reached stage 4 in the preceding 12 months Keep in mind that we have over 200 rules, and that is daunting both for end users and the ESLint team (who has to maintain them). As such, any new rules must be deemed of high importance to be considered for inclusion in ESLint.