I have no clue what's going on,
I cloned a github repo and literally just tried to change like one line but I got hit by this prettier error which makes no sense to me (I've never used prettier).
Replace ↹return·(⏎↹↹<img·alt='logo'·src='./Logo.png'·/>⏎↹);
with ··return·<img·alt="logo"·src="./Logo.png"·/>
prettier/prettier
Anything could be helpful at this point, I'm using MacOS and working on VSCode
Runs Prettier as an ESLint rule and reports differences as individual ESLint issues. If your desired formatting does not match Prettier's output, you should use a different tool such as prettier-eslint instead. Please read Integrating with linters before installing.
Benefits of using Prettier and ESLint As mentioned earlier, whereas Prettier takes care of your code formatting, ESLint takes care of your code style. The former does everything automatically for you. If you have set up Prettier, you can configure it to format your file on saving it.
I had the same issue, in the eslinrc.json file under "prettier/prettier", I removed printWidth.
This is usally due to some configuration with eslint preventing you from making errors and introducing unwanted characters in your code. I fixed this by running one line eslint --fix .
. Make sure you install eslint globally first npm i -g eslint
.
I think this is caused by Prettier being configured to use spaces instead of tabs to indent and then your code editor using tabs. So Prettier wants you to replace those tabs with spaces.
Alternatively, you can set your code editor to use tabs.
What worked for me was adding this to the rules object in .prettierrc
:
{
"useTabs": false
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With