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

fix(noSuperWithoutExtends): detect class expressions #2113

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

Sec-ant
Copy link
Contributor

@Sec-ant Sec-ant commented Mar 16, 2024

Summary

This rule should also check the extends clause of a class expression.

Fixes #2108.

Test Plan

I added a valid test case:

class A {}
class B {
	a = class extends A {
		constructor(_) {
			super();
		}
	};
}

@github-actions github-actions bot added A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Mar 16, 2024
Copy link

netlify bot commented Mar 16, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit 0ac9123
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/65f5cd56046ca70008a8754b
😎 Deploy Preview https://deploy-preview-2113--biomejs.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: 100 (no change from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Great fix!

Copy link

codspeed-hq bot commented Mar 16, 2024

CodSpeed Performance Report

Merging #2113 will degrade performances by 6.97%

Comparing Sec-ant:fix/noSuperWithoutExtends (0ac9123) with main (c6cf7e5)

Summary

❌ 1 regressions
✅ 92 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main Sec-ant:fix/noSuperWithoutExtends Change
eucjp.json[cached] 4.2 ms 4.5 ms -6.97%

@ematipico ematipico merged commit 984626d into biomejs:main Mar 16, 2024
17 of 18 checks passed
@Sec-ant Sec-ant deleted the fix/noSuperWithoutExtends branch March 17, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 super gets removed in derived anonymous class (parse/noSuperWithoutExtends)
2 participants