Closed seangwright closed 4 years ago
I'm seeing more and more cases where the constructor()
line fails validation because of how Prettier can format the class definition.
Maybe checking if the current line is a constructor is a better option than checking the previous line?
Hi, sorry, I have been absent for quite a while, just working through the issues...
I made some changes so there are conflicts now, but I am happy to try and implement this fix if you don't want to anymore. I added a contributing.md which may help you with your issues around linting/testing
With regards to just checking if the line is a constructor, I'm not sure that will work as we don't want to just ignore checking constructor functions, do you have any other examples where Prettier has formatted it in a way that causes failures? I am happy to try and fix those too
It seems mostly to be in the situations where the class definition line gets really long and breaks into 2 or more.
I'll take a look at the PR again soon.
Thanks!
I ended up fixing this myself as it was raised by someone else too.
Thanks for raising your PR though 🙂
Fixes #13
I couldn't get
npm run lint
to pass - it keeps checkingnode_modules
, I think the command options might be wrong?Also most of the
fix
tests failed for me even though I didn't change anything that should effect them.