phetsims / chipper

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

Lint rules and code patterns for typescript node code #1482

Closed zepumph closed 1 week ago

zepumph commented 1 month ago

Since adding typescript node JS code in https://github.com/phetsims/chipper/issues/1437, I think there may be good questions to answer about how our linting system or code style may want to differ. We started parsing this with some rule changes here:

https://github.com/phetsims/chipper/blob/93d830f215be91c9ed094f40ae785cccdfa4a48e/eslint/node.eslint.config.mjs#L13-L29

But there is still more to do, and I don't want these questions to block pattern making/propagation or converting files to TypeScript. Let's keep them here!

zepumph commented 1 month ago

UPDATE by @samreid: if I understand correctly, this will be handled in https://github.com/phetsims/perennial/issues/407

zepumph commented 1 month ago

14 usages of @ts-expect-error in chipper/

zepumph commented 1 week ago

UPDATE: There are currently 2 cases where we use object spread in chipper and perennial. It's more relevant for perennial where we cannot use optionize.

samreid commented 1 week ago

@zepumph and I reviewed chipper and agreed this issue is ready to close.