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: removeRuleTester in/utils in favour of the new/rule-tester package#6816

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
bradzacher merged 5 commits intov6fromv6-migrate-rule-tester
Apr 28, 2023

Conversation

bradzacher
Copy link
Member

@bradzacherbradzacher commentedApr 2, 2023
edited
Loading

BREAKING CHANGE:
RemovesRuleTester from the@typescript-eslint/utils/eslint-utils package in favour of the new@typescript-eslint/rule-tester package.

PR Checklist

Overview

Migrates our codebase to use the package added in#6777 as a thorough test of the fork to make sure it works as expected.

  • Most changes were just to the file imports
  • Some tests I was able to remove thefilename config. The old rule tester didfile.tsx for JSX files - which actually didn't work at all because TS wouldn't pick up bothfile.ts andfile.tsx.
  • I removed thebatchedSingleLineTests util from some places - but it's probably worth removing it entirely in future (once I add snapshot tests we shouldn't need it)

@bradzacherbradzacher added the repo maintenancethings to do with maintenance of the repo, and not with code/docs labelApr 2, 2023
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@bradzacher!

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.

@nx-cloud
Copy link

nx-cloudbot commentedApr 2, 2023
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commita82d5e8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 32 targets

Sent with 💌 fromNxCloud.

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commentedApr 3, 2023
edited
Loading

For future reviewing reference...

[...document.querySelectorAll(".file-header:has(.rgh-seen--11765709499)")].filter(e=>e.textContent.includes("packages/eslint-plugin/tests/rules/")&&e.textContent.includes(".test.ts")).forEach(e=>e.querySelector("form label").click())

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.

🎊

} from '@typescript-eslint/utils/eslint-utils/rule-tester';

export { batchedSingleLineTests, getFixturesRootDir };
// TODO - migrate the codebase off of this utility

Choose a reason for hiding this comment

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

[Docs] Can you include a tracking GH issue?

@@ -63,6 +63,9 @@ function isDescribeWithSkip(
);
}

/**
* @deprecated use `@typescript-eslint/rule-tester` instead
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldbergApr 3, 2023
edited
Loading

Choose a reason for hiding this comment

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

[Docs] Can you also file a delection tracking issue & link to it here? I'm guessing it'll be a v7 breaking change.

Base automatically changed fromfork-rule-tester tov6April 27, 2023 03:12
@netlify
Copy link

netlifybot commentedApr 27, 2023
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commita82d5e8
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/644b1cbe8f9d8a0007f476f6
😎 Deploy Previewhttps://deploy-preview-6816--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

@bradzacherbradzacher added breaking changeThis change will require a new major version to be released and removed repo maintenancethings to do with maintenance of the repo, and not with code/docs labelsApr 27, 2023
@bradzacherbradzacher changed the titlechore: migrate codebase to use the new rule-tester packagefeat: removeRuleTester in/utils in favour of the new rule-tester packageApr 27, 2023
@bradzacherbradzacher changed the titlefeat: removeRuleTester in/utils in favour of the new rule-tester packagefeat: removeRuleTester in/utils in favour of the newrule-tester packageApr 27, 2023
@bradzacher
Copy link
MemberAuthor

re-requesting reviews because I've made this a breaking change.
This completely removesRuleTester from/utils now - will update the blog post to point users at the new package

@bradzacherbradzacher changed the titlefeat: removeRuleTester in/utils in favour of the newrule-tester packagefeat: removeRuleTester in/utils in favour of the new/rule-tester packageApr 27, 2023
Comment on lines -277 to -290
errors: [
{
messageId: 'unsafeArraySpread',
line: 2,
column: 12,
endColumn: 25,
},
{
messageId: 'unsafeArraySpread',
line: 3,
column: 12,
endColumn: 28,
},
],
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a reason why we are not preserving loine/col/endCol ?

its a good practice to add those to validate if error message is reported in correct place

Copy link
MemberAuthor

@bradzacherbradzacherApr 27, 2023
edited
Loading

Choose a reason for hiding this comment

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

because I couldn't be bothered remapping each one before and after the prettier format.
it already took long enough to extract and convert things away from the utility as it is.

soon™️ I'll implement snapshot testing in the fork which will snapshot an error underline and will make the line/col assertions unnecessary cruft anyways.

armano2 reacted with thumbs up emoji
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.

Cute drawn Gengar-like creature dancing to the caption 'heck yes'

…v6-beta.mdCo-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
@bradzacherbradzacher merged commitc33f497 intov6Apr 28, 2023
@bradzacherbradzacher deleted the v6-migrate-rule-tester branchApril 28, 2023 04:10
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMay 6, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@armano2armano2armano2 left review comments

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg approved these changes

Assignees
No one assigned
Labels
breaking changeThis change will require a new major version to be released
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@bradzacher@JoshuaKGoldberg@armano2

[8]ページ先頭

©2009-2025 Movatter.jp