Skip to content
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

feat(linter): eslint-plugin-next/no-html-link-for-pages #3196

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented May 7, 2024

No description provided.

@github-actions github-actions bot added the A-linter Area - Linter label May 7, 2024
Copy link
Member Author

Dunqing commented May 7, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Dunqing and the rest of your teammates on Graphite Graphite

Copy link

codspeed-hq bot commented May 7, 2024

CodSpeed Performance Report

Merging #3196 will not alter performance

Comparing 05-07-feat_linter_eslint-plugin-next_no-html-link-for-pages (c73d547) with main (7363e14)

Summary

✅ 27 untouched benchmarks

@Dunqing Dunqing force-pushed the 05-07-feat_linter_eslint-plugin-next_no-html-link-for-pages branch from bb3617c to c73d547 Compare May 8, 2024 06:18
@Dunqing
Copy link
Member Author

Dunqing commented May 8, 2024

Supporting this rule may result in significant performance degradation. Because we need to port https://github.com/vercel/next.js/blob/0edf4f951e18b357226f09b2a17d26516a40cf55/packages/eslint-plugin-next/src/utils/url.ts#L4-L34. We can't globally cache the results of fs.readdirSync, which would cause us to be doing the same thing every time we run this rule. @Boshen Do you have any advice for this?

@Boshen
Copy link
Member

Boshen commented May 8, 2024

Are we able to provide a cached fs in LintContext?

@Dunqing
Copy link
Member Author

Dunqing commented May 9, 2024

Are we able to provide a cached fs in LintContext?

I will give a try. Also perhaps we could provide some sort of generic caching policy in the LintContext. As far as I know most rules could benefit from this

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

Successfully merging this pull request may close these issues.

None yet

2 participants