Skip to content

Conversation

@utarwyn
Copy link
Member

@utarwyn utarwyn commented Mar 22, 2025

This PR updates the rule @creedengo/no-multiple-style-changes (GCI12) to avoid triggering an exception when it executes on a specific piece of code without expression. This occurs when linting Next server code for example.

Fixes #66

@utarwyn utarwyn added 💉 bug: confirmed Something isn't working 🗃️ rule Impacts a rule labels Mar 22, 2025
@utarwyn utarwyn requested review from Copilot and dedece35 March 22, 2025 17:30
@utarwyn utarwyn self-assigned this Mar 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the issue where the rule "@creedengo/no-multiple-style-changes" would trigger an exception when linting code without an expression (common in Next server code). The changes include refactoring a helper function to an arrow function, updating the de-duplication condition logic, improving test case formatting, and adding a corresponding changelog entry.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
eslint-plugin/lib/rules/no-multiple-style-changes.js Refactored helper function and de-duplication logic to avoid exceptions
CHANGELOG.md Added changelog entry documenting the GCI12 fix
eslint-plugin/tests/lib/rules/no-multiple-style-changes.js Reformatted test cases to use multiline template literals for clarity

@utarwyn utarwyn force-pushed the fix-66-style-changes-error branch from df7f0c4 to cd09989 Compare March 22, 2025 17:32
@sonarqubecloud
Copy link

@utarwyn utarwyn merged commit 2c17cdd into main Mar 22, 2025
7 checks passed
@utarwyn utarwyn deleted the fix-66-style-changes-error branch March 22, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💉 bug: confirmed Something isn't working 🗃️ rule Impacts a rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint 8 - @creedengo/no-multiple-style-changes crashes with TypeError

2 participants