Skip to content

feat: autofix for prefer-logical-properties#474

Open
k-yle wants to merge 1 commit into
eslint:mainfrom
k-yle:kh/autofix-logical
Open

feat: autofix for prefer-logical-properties#474
k-yle wants to merge 1 commit into
eslint:mainfrom
k-yle:kh/autofix-logical

Conversation

@k-yle

@k-yle k-yle commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

IDE suggestions for the prefer-logical-properties rule

What changes did you make? (Give an overview)

added a fixer to all 3 cases.

Related Issues

none

Is there anything you'd like reviewers to focus on?

@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Jun 19, 2026
@eslint-github-bot

Copy link
Copy Markdown

Hi @k-yle!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
  • There should be a space following the initial tag and colon, for example 'feat: Message'.

To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.

Read more about contributing to ESLint here

@k-yle k-yle changed the title feat(prefer-logical-properties): implement autofix suggestions feat: autofix for prefer-logical-properties Jun 19, 2026
@k-yle k-yle force-pushed the kh/autofix-logical branch from a640c50 to 3e67615 Compare June 19, 2026 12:01
@DMartens DMartens moved this from Needs Triage to Implementing in Triage Jun 20, 2026
@DMartens

Copy link
Copy Markdown

Thank you for the PR.
In the future please open an issue before changing rules, so we can discuss the potential changes.
In this case the rule seems to should have a fixer (meta.fixable is set) but the fixer was not implemented. The corresponding stylelint rule property-layout-mappings also provides an autofix.
Are there cases where an autofix would be unsafe?

@k-yle

k-yle commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

an automatic fix is definitely not safe, it must be a manually reviewed suggestion.

Even if you design for RTL from day 1, there are always cases where you want something to be fixed to the the same side, regardless of LTR or RTL.

@DMartens

Copy link
Copy Markdown

I agree, in the case the rule is enabled without the underlying mindset, it can cause breakages.
Can you please remove meta.fixable property, otherwise the changes LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Implementing

Development

Successfully merging this pull request may close these issues.

2 participants