Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bcad11b

Browse files
docs: add Rule Deprecations page (typescript-eslint#6156)
* docs: add Rule Deprecations page * Update docs/maintenance/issues/Rule_Deprecations.md Co-authored-by: Brad Zacher <[email protected]> Co-authored-by: Brad Zacher <[email protected]>
1 parent b2b8ce2 commit bcad11b

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

docs/maintenance/ISSUES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
id: issues
3-
sidebar_label: Issues
43
title: Issues
54
---
65

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
id: rule-deprecations
3+
title: Rule Deprecations
4+
---
5+
6+
Sometimes a rule that used to be 👍 does not age well and becomes 👎.
7+
In the past, these cases have included:
8+
9+
- Overly opinionated and/or stylistic rules that don't represent a universal best practice
10+
- Renames
11+
- Rules moved to an external plugin
12+
13+
In these cases, we aim to remove the old rule with minimal user disruption.
14+
15+
## Filing the Issue
16+
17+
Rule deprecations can be filed as a [new issue bypassing templates](https://github.com/typescript-eslint/typescript-eslint/issues/new).
18+
19+
Provide it an `## Overview` containing:
20+
21+
- The rule name & link to its documentation page
22+
- A clear explanation of why you believe it should be deprecated
23+
- Whether it exists in popular configs such as `eslint-config-airbnb-typescript` and `eslint-config-standard-with-typescript`
24+
- Sourcegraph queries showing how often it appears in user configs
25+
26+
> See [#6036](https://github.com/typescript-eslint/typescript-eslint/issues/6036) for examples of those links and queries.
27+
28+
## Timeline
29+
30+
1. In any minor/patch version, add [rule `meta` properties](https://eslint.org/docs/latest/developer-guide/working-with-rules#rule-basics):
31+
- `deprecated: true`
32+
- `replacedBy`, if applicable
33+
2. In the next major version, you may delete the rule
34+
- If the rule is relatively popular with users, consider leaving a documentation page as a tombstone pointing to the new relevant rule or docs (see [`camelcase`](https://typescript-eslint.io/rules/camelcase/) as an example)

packages/website/sidebars/sidebar.base.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,16 @@ module.exports = {
6767
},
6868
{
6969
items: [
70-
'maintenance/issues',
70+
{
71+
collapsible: false,
72+
items: ['maintenance/issues/rule-deprecations'],
73+
label: 'Issues',
74+
link: {
75+
id: 'maintenance/issues',
76+
type: 'doc',
77+
},
78+
type: 'category',
79+
},
7180
'maintenance/pull-requests',
7281
'maintenance/releases',
7382
'maintenance/versioning',

0 commit comments

Comments
 (0)