Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(eslint-plugin-internal): [no-dynamic-tests] new internal Lint rule to ban dynamic syntax in generating tests#11323

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

nayounsang
Copy link
Contributor

@nayounsangnayounsang commentedJun 20, 2025
edited
Loading

PR Checklist

Overview

no-dynamic-tests

Ban these:

{invalid:{...spread},valid:identifier,invalid:bi+nary,valid:callExp(),invalid:`${templateLiteralWithDynamic()}`,valid:obj.member,invalid:condition?foo :bar,}

For test case object, It validate these keys recursively:code,error.
No checks are performed on other keys.

Applied the rules to the test file ineslint-plugin &eslint-plugin-internal.Bulk suppression feature was applied.
Create the script to update suppression.

kirkwaiblinger reacted with thumbs up emoji
@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 onhttps://opencollective.com/typescript-eslint.

@netlifyNetlify
Copy link

netlifybot commentedJun 20, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitc973039
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/68e3c39af134b500087b80f1
😎 Deploy Previewhttps://deploy-preview-11323--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: 81 (🟢 up 3 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 yourNetlify project configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedJun 20, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commitc973039

CommandStatusDurationResult
nx run-many -t lint✅ Succeeded3m 22sView ↗
nx run-many -t typecheck✅ Succeeded2m 8sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded4sView ↗
nx test eslint-plugin --coverage=false✅ Succeeded4sView ↗
nx run types:build✅ Succeeded5sView ↗
nx test typescript-estree --coverage=false✅ Succeeded1sView ↗
nx run integration-tests:test✅ Succeeded3sView ↗
nx run generate-configs✅ Succeeded6sView ↗
Additional runs (29)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-10-06 13:33:46 UTC

@nayounsangnayounsang changed the titlefeat(eslint-plugin-internal) : Lint rule to ban dynamic syntax in generating testsfeat(eslint-plugin-internal): Lint rule to ban dynamic syntax in generating testsJun 20, 2025
@codecovCodecov
Copy link

codecovbot commentedJun 20, 2025
edited
Loading

Codecov Report

❌ Patch coverage is93.60000% with8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.69%. Comparing base (02e0278) to head (c973039).
⚠️ Report is 2 commits behind head on main.

Files with missing linesPatch %Lines
...lint-plugin-internal/src/rules/no-dynamic-tests.ts93.60%8 Missing⚠️
Additional details and impacted files
@@           Coverage Diff            @@##             main   #11323    +/-   ##========================================  Coverage   90.68%   90.69%            ========================================  Files         516      517     +1       Lines       52051    52176   +125       Branches     8598     8632    +34     ========================================+ Hits        47202    47319   +117- Misses       4835     4843     +8  Partials       14       14
FlagCoverage Δ
unittest90.69% <93.60%> (+<0.01%)⬆️

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

Files with missing linesCoverage Δ
...lint-plugin-internal/src/rules/no-dynamic-tests.ts93.60% <93.60%> (ø)
🚀 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.

@nayounsangnayounsang changed the titlefeat(eslint-plugin-internal): Lint rule to ban dynamic syntax in generating testsfeat(eslint-plugin-internal): [no-dynamic-tests] new internal Lint rule to ban dynamic syntax in generating testsJun 20, 2025
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Only the one request for an added test is blocking IMO. Everything else is nitpicks that can be ignored if you don't like them. 🙂

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelJun 23, 2025
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesJun 24, 2025
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🔥 thanks!

@JoshuaKGoldbergJoshuaKGoldberg added 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge and removed awaiting responseIssues waiting for a reply from the OP or another party labelsJun 24, 2025
Copy link
Member

@kirkwaiblingerkirkwaiblinger left a comment

Choose a reason for hiding this comment

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

I think that if we intend to use this ever, we should enable it already now for all the files that don't currently have violations. (Maybe even this is a good chance for us to try out the eslintbulk suppressions feature)?

Also, please do enable the rule on the codebase and have a look at the reports to see whether they make sense and would make sense to a contributor.

Thanks!

@kirkwaiblingerkirkwaiblinger added awaiting responseIssues waiting for a reply from the OP or another party and removed 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelsJul 6, 2025
@nayounsang

This comment was marked as resolved.

JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesSep 15, 2025
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

LGTM. +1 to@kirkwaiblinger's suggestions on improving the reporting of the rule. I'll want to hear from Kirk before merging too.

@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelSep 15, 2025
Copy link
Member

@kirkwaiblingerkirkwaiblinger left a comment

Choose a reason for hiding this comment

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

(see comment)

@JoshuaKGoldbergJoshuaKGoldberg removed the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelSep 16, 2025
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesOct 3, 2025
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg 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 to me, thanks for jumping on this! 🙌

I'll note that the rule isn'tcompletely covered by unit tests. But since it's internal & specific to this repo (for now?) I think that's fine.

@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelOct 3, 2025
@JoshuaKGoldbergJoshuaKGoldberg requested review fromkirkwaiblinger and removed request forkirkwaiblingerOctober 3, 2025 12:06
@github-actionsgithub-actionsbot removed the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelOct 3, 2025
@JoshuaKGoldbergJoshuaKGoldberg merged commitaea862d intotypescript-eslint:mainOct 6, 2025
68 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg left review comments

@kirkwaiblingerkirkwaiblingerAwaiting requested review from kirkwaiblinger

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Repo: Lint rule to ban dynamic syntax in generating tests
3 participants
@nayounsang@JoshuaKGoldberg@kirkwaiblinger

[8]ページ先頭

©2009-2025 Movatter.jp