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

test(eslint-plugin): render snapshots of ESLint output for each code example#8497

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 27 commits intotypescript-eslint:mainfromauvred:chore/8382
Apr 4, 2024

Conversation

auvred
Copy link
Member

@auvredauvred commentedFeb 17, 2024
edited
Loading

rubiesonthesky and kirkwaiblinger reacted with hooray emoji
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@auvred!

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 commentedFeb 17, 2024
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit25c8102
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/660e8d1cac13fd0008467d16
😎 Deploy Previewhttps://deploy-preview-8497--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: 99 (🟢 up 8 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (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 site configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedFeb 17, 2024
edited
Loading

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 31 targets

Sent with 💌 fromNxCloud.

@codecovCodecov
Copy link

codecovbot commentedFeb 17, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.08%. Comparing base(d863dd6) to head(25c8102).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #8497      +/-   ##==========================================+ Coverage   88.02%   88.08%   +0.05%==========================================  Files         405      405                Lines       14089    14089                Branches     4125     4125              ==========================================+ Hits        12402    12410       +8+ Misses       1382     1376       -6+ Partials      305      303       -2
FlagCoverage Δ
unittest88.08% <ø> (+0.05%)⬆️

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

see 5 files with indirect coverage changes

Comment on lines 236 to 241
#### ❌ Incorrect for `requireNullish: true`

```ts option='{ "requireNullish": true }'
```ts option='{ "requireNullish": true }' skipValidation
declare const thing1: string | null;
thing1 && thing1.toString();
```
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is a bug in the rule:#8487. For now I'll just addskipValidation...

@auvredauvred marked this pull request as ready for reviewMarch 4, 2024 05:54
Copy link
Contributor

@rubiesontheskyrubiesonthesky left a comment

Choose a reason for hiding this comment

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

I added one possible documentation change. Otherwise I think this is a great idea and execution 🎉

@auvredauvred added the blocked by another PRPRs which are ready to go but waiting on another PR labelMar 6, 2024
@JoshuaKGoldberg
Copy link
Member

🙌 unblocked now, I think!

auvred reacted with thumbs up emoji

@JoshuaKGoldbergJoshuaKGoldberg removed the blocked by another PRPRs which are ready to go but waiting on another PR labelApr 1, 2024
Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

this looks good to me! Amazing work!
This should go a long way in helping us ensure we don't write bad docs!

Comment on lines +117 to +126
beforeAll(async () => {
// dynamic import('...') is transpiled to the require('...') call,
// but all modules imported below are ESM only, so we cannot require() them
// eslint-disable-next-line @typescript-eslint/no-implied-eval
const dynamicImport = new Function('module', 'return import(module)');
({ fromMarkdown } = await dynamicImport('mdast-util-from-markdown'));
({ mdxjs } = await dynamicImport('micromark-extension-mdxjs'));
({ mdxFromMarkdown } = await dynamicImport('mdast-util-mdx'));
unistUtilVisit = await dynamicImport('unist-util-visit');
});
Copy link
Member

Choose a reason for hiding this comment

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

question: could we change this file's extension to.mts so that we can use ESM and avoid this hack?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ah, I've tried it!

But if we change it to.mts, we get a bunch of other issues:

  • we need to add.js extension to relative imports because ofmoduleResolution
  • we have to remove these.js extensions in jest viamoduleNameMapper (jest does not load these files withoutmoduleNameMapper)
  • these imported files contain all exported members in thedefault property, so I addedinteropDefault

Here I tried to address all of them -auvred@020b12c (yarn lint,yarn test andyarn typecheck pass locally)

I'm not sure which solution is better (I don't like both, though 😄)

Copy link
Member

@bradzacherbradzacherApr 4, 2024
edited
Loading

Choose a reason for hiding this comment

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

Ugh jest is becoming a burden.
Might be about time to consider migrating to something else that supports ESM better.

@bradzacherbradzacher added the testsanything to do with testing labelApr 4, 2024
@bradzacherbradzacher merged commita7bdd1c intotypescript-eslint:mainApr 4, 2024
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 12, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@rubiesontheskyrubiesontheskyrubiesonthesky left review comments

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg left review comments

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
testsanything to do with testing
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Docs: [non-nullable-type-assertion-style] incorrect example does not report error. Docs: render snapshots of all rule doc example eslint output
4 participants
@auvred@JoshuaKGoldberg@rubiesonthesky@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp