🌐 AI搜索 & 代理 主页
Skip to content

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.

@netlify
Copy link

netlify bot commented Aug 8, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 526b6a3
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/68bac2395af13a0007c3b419
😎 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: 97 (no change 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
@nx-cloud
Copy link

nx-cloud bot commented Aug 8, 2025

View your CI Pipeline Execution ↗ for commit 526b6a3

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

☁️ Nx Cloud last updated this comment at 2025-09-05 11:11:50 UTC

@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.91%. Comparing base (7319bad) to head (526b6a3).
⚠️ Report is 67 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11467      +/-   ##
==========================================
+ Coverage   90.88%   90.91%   +0.03%     
==========================================
  Files         505      505              
  Lines       51125    51160      +35     
  Branches     8415     8426      +11     
==========================================
+ Hits        46463    46513      +50     
+ Misses       4648     4634      -14     
+ Partials       14       13       -1     
Flag Coverage Δ
unittest 90.91% <100.00%> (+0.03%) ⬆️

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.20% <100.00%> (-0.03%) ⬇️
...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.79% <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%> (ø)

... and 18 files with indirect coverage changes

🚀 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

## 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.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, 80% isn't quite the same as our policy. This is perfect 🙂 I wouldn't have picked up on any problems with your English.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! There's just one visual bug to fix; nothing else blocking. ✨

}

.ruleNameWrapper {
display: flex;
Copy link
Member

Choose a reason for hiding this comment

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

[Bug] Putting this new div into block flow is causing extra padding

Before After
Before screenshot of a few rules table rows showing no vertical space between rule name and description After screenshot of a few rules table rows showing about 1rem of vertical space between rule name and description

The flex is good, but it should be inline:

Suggested change
display: flex;
display: inline-flex;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image Great. I committed.

url?: string;

/**
* Mark this rule as frozen.
Copy link
Member

Choose a reason for hiding this comment

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

[Docs] Nit: just to make this comment a bit more informative.

Suggested change
* Mark this rule as frozen.
* Mark this rule as feature-frozen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I committed.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Sep 3, 2025
@github-actions github-actions bot removed the awaiting response Issues waiting for a reply from the OP or another party label Sep 5, 2025
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changes Sep 5, 2025
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Lovely, thanks! 🙌

@JoshuaKGoldberg JoshuaKGoldberg merged commit 8154204 into typescript-eslint:main Sep 8, 2025
61 of 62 checks passed
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

2 participants