Skip to content

docs: mark rules that are frozen on rules index page #11467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

nayounsang
Copy link
Contributor

@nayounsang nayounsang commented Aug 8, 2025

PR Checklist

Overview

  1. mark these rule as frozen
  2. add frozen emoji in rule table on rule index page
frozen emoji
  1. add frozen description on each rule page
frozen block
  1. add frozen explanation on rule index page (Obviously, the frozen property is for contributors, so I'm not sure if the rule index page is the right place. ESLint also has an explanation in its contribution documentation. However, I couldn't find a suitable place in the contribution pages either. I think it could be replaced with the link of eslint's.)
explain frozen
  1. add frozen property in meta data of rule.
// packages/utils/src/ts-eslint/Rule.ts

export interface DeprecatedInfo {
  /**
   * The estimated version when the rule is removed (probably the next major
   * version). null means the rule is "frozen" (will be available but will not
   * be changed).
   */
  availableUntil?: string | null;
}

We can determine if something is frozen by deprecated.availableUntil === null, but I don't like this property, so I add new property: docs.frozen.

  • This interface is necessary for alignment with eslint, but deprecated and frozen are different.
  • deprecated can be boolean(truthy) or object(truthy). Additional conditions are needed to distinguish between the two.
  • Type guards (or additional conditions) are required to access object property.
  • availableUntil can be undefined or null. Adding unnecessary comments to bypass the eqeqeq lint rule
  • There are many codes written for these reason, and it is judged that they actually have a negative impact on maintenance.

TODO

  • Check if other rules in eslint are frozen. <- can't find it anymore

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @nayounsang!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Aug 8, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit a004167
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/68962c805d39d80008fa0e83
😎 Deploy Preview https://deploy-preview-11467--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🟢 up 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@nayounsang nayounsang marked this pull request as draft August 8, 2025 08:28
Copy link

nx-cloud bot commented Aug 8, 2025

View your CI Pipeline Execution ↗ for commit a004167

Command Status Duration Result
nx test eslint-plugin --coverage=false ✅ Succeeded 5m 5s View ↗
nx run-many -t lint ✅ Succeeded 3m 15s View ↗
nx run-many -t typecheck ✅ Succeeded 2m 18s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 4s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 2s View ↗
nx run types:build ✅ Succeeded 5s View ↗
nx run integration-tests:test ✅ Succeeded 3s View ↗
nx run generate-configs ✅ Succeeded 7s View ↗
Additional runs (27) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-08-08 17:08:44 UTC

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.88%. Comparing base (7319bad) to head (a004167).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11467   +/-   ##
=======================================
  Coverage   90.88%   90.88%           
=======================================
  Files         505      505           
  Lines       51125    51132    +7     
  Branches     8415     8415           
=======================================
+ Hits        46463    46470    +7     
  Misses       4648     4648           
  Partials       14       14           
Flag Coverage Δ
unittest 90.88% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ages/eslint-plugin/src/rules/default-param-last.ts 96.82% <100.00%> (+0.05%) ⬆️
packages/eslint-plugin/src/rules/dot-notation.ts 99.23% <100.00%> (+<0.01%) ⬆️
...kages/eslint-plugin/src/rules/init-declarations.ts 100.00% <100.00%> (ø)
...ackages/eslint-plugin/src/rules/member-ordering.ts 99.20% <100.00%> (+<0.01%) ⬆️
...kages/eslint-plugin/src/rules/naming-convention.ts 97.81% <100.00%> (+<0.01%) ⬆️
...ckages/eslint-plugin/src/rules/no-magic-numbers.ts 98.37% <100.00%> (+<0.01%) ⬆️
...es/eslint-plugin/src/rules/prefer-destructuring.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nayounsang nayounsang marked this pull request as ready for review August 8, 2025 16:24
/**
* Mark this rule as frozen.
*/
frozen?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide where to put the description of frozen, can link it here too.


## Frozen Rules

When rules are feature complete, they are marked as frozen (indicated with ❄️ in the documentation). This applies to standalone rules that are complete, as well as [extension rules](#extension-rules) whose underlying core ESLint rules are frozen. After that point, we expect users to use [disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) when they find an edge case that isn’t covered.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is slightly different from the ESLint's.
I don't quite understand the 80% policy, so I added a line that says the dependent ESLint rule is frozen.
However, my English isn't very good, so I'm not sure if the meaning is natural.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: mark rules that are frozen on rules index page
1 participant