News for hackers. Stuff that matters.
Re:Complete Rewrite of ESLint by AbuAssar on Monday November 28, 2022 @07:58AM (#33773036)
> I don't want to rewrite in TypeScript, because I believe the core of ESLint should be vanilla JS

why though?

Re:Complete Rewrite of ESLint by redox99 on Monday November 28, 2022 @07:59AM (#33773051)
The fact that they would use JSDoc type annotations and tsc instead of just typescript seems insane to me.
Re:Complete Rewrite of ESLint by have_faith on Monday November 28, 2022 @08:05AM (#33773114)
Yeah, surely in some hypothetical future it's not that much work to simply go back to plain JS from TS if they're worried about some sort of lock-in. Seems like you might as well just write it in TS then if it's relatively trivial to eject if needed.
Re:Complete Rewrite of ESLint by satvikpendem on Monday November 28, 2022 @08:16AM (#33773234)
Just the other day I read this thread on Reddit about the link above and this thread stood out to me. This person uses TypeScript files to define types, then uses JSDoc to import the types into JS. They said they didn't want a build tool but I agree, it seemed insane to me.

https://old.reddit.com/r/javascript/comments/z4lwlo/complete...

Re:Complete Rewrite of ESLint by adamddev1 on Monday November 28, 2022 @08:05AM (#33773122)
Ya I am also perplexed about how people keep suggesting using jsdoc instead of TypeScript. Is it just to avoid the tooling?
Re:Complete Rewrite of ESLint by tytho on Monday November 28, 2022 @08:36AM (#33773457)
From 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.

Re:Complete Rewrite of ESLint by robby_w_g on Monday November 28, 2022 @10:05AM (#33774489)
Over 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.

Re:Complete Rewrite of ESLint by Aeolun on Monday November 28, 2022 @12:05PM (#33776139)
Rome 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.

Re:Complete Rewrite of ESLint by robby_w_g on Monday November 28, 2022 @04:30PM (#33780007)
My 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
Re:Complete Rewrite of ESLint by NateEag on Monday November 28, 2022 @08:15AM (#33773223)
I 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.

Re:Complete Rewrite of ESLint by madeofpalk on Monday November 28, 2022 @08:41AM (#33773515)
I would guess that more people know how to write Typescript than annotate with JSDoc.
Re:Complete Rewrite of ESLint by tonto on Monday November 28, 2022 @08:24AM (#33773314)
I 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
Re:Complete Rewrite of ESLint by ohbtvz on Monday November 28, 2022 @08:59AM (#33773707)
The kind of people who'd be willing to contribute to eslint are very probably not afraid of writing in typescript.
Re:Complete Rewrite of ESLint by echeese on Monday November 28, 2022 @08:59AM (#33773706)
Probably so they can run it through ESLint