Closed EdwardBarton closed 4 years ago
Hi!
This repo is just a config that turns off a bunch of ESLint rules, so this is not the right place to report this issue. The thing that lets you run Prettier from within ESLint comes from eslint-plugin-prettier. But I’ll try to help anyway.
The way to debug these types of issues is to reduce the number of tools you use at once.
First, try running prettier --write some/file.ts
. Does it do arrowParens as expected? (First remove some parens and see if Prettier puts them back.) After this step you’ll know if there’s any problem with your Prettier setup.
Then, try running eslint some/file.ts
. Does it report that you should remove parens? After this step, you’ll know if there’s any problem with your ESLint/eslint-plugin-prettier setup.
Finally, run from within VSCode. Do you get errors only now? Then, the problem is with the ESLint plugin for VSCode.
When you know if the problem seems to come from Prettier, ESLint or VSCode, start reducing your config. Remove things piece by piece until you have a minimal reproduction. Many times when doing this, I find that the problem was due to a configuration mistake by me! If not, you’ve now got a minimal repro to share in an issue for the appropriate project.
Hope this helps!
@lydell I am so sorry for posting in the wrong repo! Thanks to your helpful troubleshooting steps, I was able to determine that it was indeed a problem with the VSCode extension. Uninstalling/re-installing the extension fixed the issue! Sorry again.
Thanks for your help!
I am receiving a linting error regarding arrow parens, despite having the latest versions of prettier (2.0.5), eslint-config-prettier (6.11.0), and eslint-plugin-prettier (3.1.3)
Here is a snippet from my
.eslintrc.js
Additionally, here is my
.prettierrc.js
file:If I comment out
plugin:prettier/recommended
the lint error goes away, but I'd prefer to extend from the recommended config.