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

Apply fixes using SourceCodeFixer instead of a plugin #337

Merged
merged 18 commits into from
Jan 3, 2024

Conversation

mizdra
Copy link
Owner

@mizdra mizdra commented Jan 3, 2024

This change is a fifth step towards resolving #283.

@mizdra mizdra added the Type: Refactoring A code change that neither fixes a bug nor adds a feature label Jan 3, 2024
@mizdra mizdra marked this pull request as ready for review January 3, 2024 06:47
Comment on lines -89 to -94
// 🤯🤯🤯 THIS IS SUPER HACK!!! 🤯🤯🤯
// fix するとコードが変わり、また別の lint エラーが発生する可能性があるため、eslint は `context.report` で
// 報告されたエラーの fix がすべて終わったら、再び create を呼び出し、また `context.report` で fix 可能なエラーが
// 報告されないかを確認する仕様になっている (これは `context.report` で fix 可能なものがなくなるまで続く)。
// そのため、ここでは2回目以降 create が呼び出された時に、誤って再び fix してしまわないよう、fix 済み
// であれば early return するようにしている。
Copy link
Owner Author

Choose a reason for hiding this comment

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

The super hack is removed!

@mizdra mizdra merged commit 1a6f7ad into main Jan 3, 2024
26 checks passed
@mizdra mizdra deleted the refactoring-fixer-2 branch January 3, 2024 07:08
@mizdra mizdra changed the title refactor: Apply fixes using SourceCodeFixer instead of a plugin Apply fixes using SourceCodeFixer instead of a plugin Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Refactoring A code change that neither fixes a bug nor adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant