My eslint/prettier setup seems to be fixing things that it is not configured to fix, it’s doing a full replace of all semi-colons and single quotes but I don't believe that is included in our eslint/prettier setup. I have co-workers who run the same linter all the time (this was just pulled from master) so when I run it, it should not be making style changes to every js file in the project…
I know eslint supports hierarchies so, theoretically, a prettier file in my system might have been causing this to happen but I’ve added "root": true
to the file and I continue to have the issue.
This is the .eslintrc.json
file:
{
"root": true, // <- this is the only change I've made
"extends": [
"airbnb-base",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"react",
"jsx-a11y",
"prettier"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"globals": {
"document": true,
"window": true
}
}
Every time the above is run I get errors such like:
7:14 error Replace `"form"` with `'form'` prettier/prettier
9:2 error Delete `;` prettier/prettier
I've tried running yarn lint --debug
and I didn't see any outside linter/prettier scripts that would be overriding the above.
I'm not a JS expert by any means, I sort of believe that prettier is configured by default to remove semi-colons and double quotes but the fact that this does not happen for my coworkers leads me to believe that this configuration should disable that but it is not for me.
For further context, I do have the Prettier plugin for Atom but I have tried running this with it disabled and even uninstalled. I've also uninstalled my global Prettier package.