phetsims / chipper

Tools for developing and building PhET interactive simulations.
http://scenerystack.org/
MIT License
12 stars 14 forks source link

List all provided TypeScript ESLint rules #1277

Open samreid opened 2 years ago

samreid commented 2 years ago

After https://github.com/phetsims/chipper/issues/1276, we should follow that same convention for listing all of the existing TypeScript ESLint rules. We can add comments about why our team has enabled or disabled a rule.

I have converted to this form on my working copy but have more adjustments before I'll be ready to commit. Probably some time Monday.

Heads up to @jessegreenberg who did the initial work on setting up TypeScript ESLint rules.

samreid commented 2 years ago

Noting that this issue is an extension of https://github.com/phetsims/chipper/issues/1114

samreid commented 2 years ago

In https://github.com/phetsims/axon/issues/402 we saw several places where IEmitter specified the default type IEmitter<[]> and it would be good to enable the rule no-unnecessary-type-arguments.

samreid commented 2 years ago

I added a rule that seemed to match with our conventions, @typescript-eslint/explicit-module-boundary-types but couldn't figure it out for mixins so it is disabled on those lines.

samreid commented 2 years ago

There are about 30 remaining rules that are marked as TODO about enabling the rule or investigating it more. About a dozen of those rules have autofix. I've been chipping away at this but am ready to bring back to dev meeting for check-in and to see how we want to divide the remaining work.

jessegreenberg commented 1 year ago

While working on #1368 I noticed that explicit-module-boundary-types was enabled for this issue. It has a lot of overlap with our custom explicit-method-return-types, I am wondering if we can delete explicit-method-return-types now.

marlitas commented 1 year ago

This issue has no assignments and @jessegreenberg's question seems worthy to bring return to to be discussed so that his question can be answered, and this issue reassigned.

jessegreenberg commented 1 year ago

Regarding https://github.com/phetsims/chipper/issues/1277#issuecomment-1352109108, explicit-module-boundary-types does not require return types for private functions. So I prefer our custom explicit-method-return-types and think we should keep it. Our rule also has an auto fix which is nice to keep around.

Ill remove from agenda since that is why it was added.