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

Option to fix only layout issues #429

Open
sryze opened this issue Jan 5, 2022 · 1 comment
Open

Option to fix only layout issues #429

sryze opened this issue Jan 5, 2022 · 1 comment

Comments

@sryze
Copy link

sryze commented Jan 5, 2022

  • prettier-eslint-cli version: 5.0.1
  • prettier version: 1.19.1
  • eslint version: 5.16.0

Relevant code/config.

npm install --save-dev prettier-eslint
import React from 'react';

export default function Component() {
    return (
        <div>
            <a href="http://google.com/" target="_blank">Test</a>
        </div>
    );
}

What you did:

npx prettier-eslint --write Component.js

What happened:

prettier-eslint added rel="noreferrer" to the <a> element:

import React from 'react';

export default function Component() {
    return (
        <div>
            <a href="http://google.com/" target="_blank" rel="noreferrer">
                Test
            </a>
        </div>
    );
}

Reproduction:

Problem description:

I'd like to have prettier-eslint fix only code style issues (spacing, formatting, etc), rather than all autofixable issues. But there seems to be no option to achieve this.

Suggested solution:

Perhaps provide a command-line option to change the --fix-type option of ESLint?

More info here: https://eslint.org/docs/user-guide/command-line-interface#--fix-type

@sryze sryze changed the title Fix only layout issues Option to fix only layout issues Jan 5, 2022
@JounQin
Copy link
Member

JounQin commented Aug 13, 2022

PR welcome to add this feature!

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

No branches or pull requests

2 participants