prettier-eslint-cli
prettier-eslint-cli copied to clipboard
Option to fix only `layout` issues
-
prettier-eslint-cliversion: 5.0.1 -
prettierversion: 1.19.1 -
eslintversion: 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
PR welcome to add this feature!