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!: @W-17529338 reformat SSR rules to support eslint v9 #180

Merged

Conversation

abhagta-sfdc
Copy link
Collaborator

@abhagta-sfdc abhagta-sfdc commented Jan 3, 2025

Need to update the format of ssr rules as in eslint v9 '/' is no longer valid in rule id.
To maintain uniformity of ssr rules they have been prefixed with 'ssr-'

Without this change, eslint v9 update is blocked as the rules cannot be configured in eslint-config-lwc. It results in the error as shown below:
Screenshot 2025-01-03 at 11 30 25 AM

Follow up to #170

BREAKING CHANGE: The ssr related rules will be renamed from @lwc/lwc/ssr/no-xxx to @lwc/lwc/ssr-no-xxx

Verified

This commit was signed with the committer’s verified signature.
troy0820 Troy Connor
Copy link
Contributor

@ravijayaramappa ravijayaramappa left a comment

Choose a reason for hiding this comment

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

Needs a fix for the doc url

@@ -16,7 +16,7 @@ module.exports = {
docs: {
description: 'Discourage use of formFactor.',
category: 'LWC',
url: docUrl('ssr/no-form-factor'),
url: docUrl('docs/rules/ssr/ssr-no-form-factor'),
Copy link
Contributor

Choose a reason for hiding this comment

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

docs/rules/ is prepended by docUrl routine. Same comment for all the other docUrls changes below.

Suggested change
url: docUrl('docs/rules/ssr/ssr-no-form-factor'),
url: docUrl('ssr/ssr-no-form-factor'),

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed it myself and requested @nolanlawson to review and approve.

Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

This is a breaking change so should be mentioned in the release notes with migration instructions (i.e. use ssr- instead of ssr/). Otherwise LGTM

@ravijayaramappa ravijayaramappa changed the title @W-17529338 reformat SSR rules to support eslint v9 feat!: @W-17529338 reformat SSR rules to support eslint v9 Jan 3, 2025
@ravijayaramappa ravijayaramappa merged commit 23520d2 into salesforce:master Jan 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants