Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "eslint"
Fucking hell. Typescript is configured to require explicit typing of everything "because sometimes it does weird conversions". But because temporary variables can have weird types used just there (like arrays of various objects), there is a lot of variables typed as any.
That's bad on its own, but whatever. The real kicker is that eslint is set to throw warnings whenever it sees any, "so that people don't just put any on everything". I guess that was a failure...
I asked around and it turns out that TS and eslint were configured by two teams independently that merged when the project was new young, and it sort of stayed that way. No one from the original team is even working in the co panu anymore, yet this clusterfuck still lingers on, and even spreads to every new project that team starts8
Why the fuck why are tslint and prettier are always sucking their dicks and fuck each others asses.
Do you know this moment when you think:.... 🤔 They have millions of downloads, why do I bother formatting my code so much. Mabye all this people are smarter and saving so much time.
Then you set up eslint and prettier adjusting 10000k rules just to find eslint and prettier five minutes later in one file fucking their asses again how to indent on save😠😱7
I don’t know if I’m fucking stupid but ESLint is so unbelievably hard to setup. Too many fucking plug-ins, configs and rules. All I want is my Airbnb config on my React Typescript project and nothing else. I can’t even fucking get that sorted. Not to mention the hundreds of Medium tutorials that all do things just slightly differently to the point that I can’t mix and match a config.2
About a year ago I had the great idea to enforce ago I had the great idea of proposing that we all lint our legacy code base using eslint to increase the overall quality of our JS.
I distributed the task of initially fixing all the errors eslint would find to the whole Frontend team (Luckily we only use JS there). I've finished my part in a couple of weeks and came across this piece of spaghetti.
One of the guys who has been with the company for over 10 years said, that the guy who wrote this monster was very proud of it...
In case you cannot understand what this does: It calculates the distance between 2 points on earth.9
Anyone know of a good non-opinionated ESlint default config that does a little more than eslint:recommended? I find eslint-config-airbnb-base & eslint-config-standard to be way too annoying and restrictive1
Is there any tool that generates an eslint config interactively? E.g. I would start off with airbnb style (but not required) and then toggle different options and see what changes and what will be highlighted. In the end I can save the config. I know eclipse provides such a wizard for java, but haven't found an equivalent one for JS/TS. Anything better than ESLint playground?1