4 ms·
Ya I am also perplexed about how people keep suggesting using jsdoc instead of TypeScript. Is it just to avoid the tooling?
by adamddev1 4y ago
Ya I am also perplexed about how people keep suggesting using jsdoc instead of TypeScript. Is it just to avoid the tooling?
- NateEag 4y agoI think it's to maximize potential contributor base. JS is the front-end browser language. That's its origin story and it almost certainly will always have that job, because of web browser backwards compatibility. That's why it's so universally known / used / understood. Once you target TypeScript you're suddenly looking at a much smaller set of devs who know it, and you're married to a language that's effectively owned by a single company (MS, to boot). You can get decent gains in type-checking by writing JSDoc and using tsc in your build process without adding much friction for new contributors.
- tonto 4y agoI think its more that eslint at its core does not support typescript and they want to run the eslint tool theyre developing over the eslint codebase. It's hard to argue with this but it doesnt seem like the greatest outcome
- madeofpalk 4y agoI would guess that more people know how to write Typescript than annotate with JSDoc.
- ohbtvz 4y agoThe kind of people who'd be willing to contribute to eslint are very probably not afraid of writing in typescript.
- tytho 4y agoFrom personal experience, you don’t ever “just use TypeScript”. You have to install plugins, adapters, parsers for every other tool (linters, formatters, bundlers) to also make them work with TypeScript. Adding TypeScript into the mix increases the number of dependencies (dev or not) dramatically. If you use the jsdoc flavor of TypeScript, you only need to install the one dependency. Not saying it’s the best reason, but a reason nonetheless.
- robby_w_g 4y agoOver the weekend, I converted an app from JS + Create React App to Typescript + Parcel v2. The typescript tooling was extremely simple to setup with only a few added packages... until I had to setup eslint. That's when I had to install a half dozen plugins, adapters, parsers, etc like you said. Granted, the linked eslint rewrite seems to have plans to make the typescript linting tooling simpler. However, I might end up switching to Rome in the meantime just for simpler dependency management.
- Aeolun 4y agoRome is very nice right now. My linting finishes in 50ms, as it’s supposed to, instead of minutes in eslint. Of course they don’t have nearly the same amount of rules, but we’ll get there.
- robby_w_g 4y agoMy project currently pulls in the airbnb rules, which in my opinion has too many rules. It might be nice to start from a clean slate, I'll give Rome a shot next weekend