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(lint): add noImgElement rule #4155

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Conversation

kaioduarte
Copy link
Contributor

Summary

Implement no-img-element from eslint-plugin-next.

Test Plan

Snapshots + CI

@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Oct 1, 2024
@kaioduarte kaioduarte changed the title feat(lint): add no-img-element from eslint-plugin-next feat(lint): add no-img-element from eslint-plugin-next Oct 1, 2024
Copy link

codspeed-hq bot commented Oct 1, 2024

CodSpeed Performance Report

Merging #4155 will not alter performance

Comparing kaioduarte:no-img-element (f8db5d5) with main (35bb699)

Summary

✅ 105 untouched benchmarks

crates/biome_js_analyze/src/lint/nursery/no_img_element.rs Outdated Show resolved Hide resolved
crates/biome_js_analyze/src/lint/nursery/no_img_element.rs Outdated Show resolved Hide resolved
crates/biome_js_analyze/src/lint/nursery/no_img_element.rs Outdated Show resolved Hide resolved
crates/biome_js_analyze/src/lint/nursery/no_img_element.rs Outdated Show resolved Hide resolved
crates/biome_js_analyze/src/lint/nursery/no_img_element.rs Outdated Show resolved Hide resolved
Comment on lines 48 to 50
i Consider using <Image /> from next/image to automatically optimize images.

i This may incur additional usage or cost from your provider.
Copy link
Member

Choose a reason for hiding this comment

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

Please swap the messages. It's usually:

  1. Error
  2. Explain the error
  3. Suggest a fix

It's explained in the rule pillars

@kaioduarte kaioduarte changed the title feat(lint): add no-img-element from eslint-plugin-next feat(lint): add noImgElement from eslint-plugin-next Oct 6, 2024
@kaioduarte kaioduarte changed the title feat(lint): add noImgElement from eslint-plugin-next feat(lint): add noImgElement rule Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants