Closed zepumph closed 1 week ago
.js
suffix. Should we be consistent, and always include .js like in sim code? Also sometimes I see it imports .ts
, probably we never want that. Maybe a lint rule like this? https://stackoverflow.com/questions/69939948/how-can-i-make-eslint-force-imports-of-ts-files-to-have-a-js-extensionUPDATE by @samreid: if I understand correctly, this will be handled in https://github.com/phetsims/perennial/issues/407
14 usages of @ts-expect-error
in chipper/
phet/no-object-spread-on-non-literals
allowed in node code?~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.
@zepumph and I reviewed chipper and agreed this issue is ready to close.
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!