League-of-Foundry-Developers / foundry-vtt-types

Unofficial type declarations for the Foundry Virtual Tabletop API
MIT License
111 stars 52 forks source link

Lint against `.mjs` in imports #2609

Closed LukeAbby closed 1 month ago

LukeAbby commented 1 month ago

This is just a minor consistency thing.

JPMeehan commented 1 month ago

Related to #2528

Another lint to add is require overrides

kmoschcau commented 1 month ago

Can we expand a bit more, what the ask here is? Right now I don't really know what needs to be done here.

JPMeehan commented 1 month ago

Can we expand a bit more, what the ask here is? Right now I don't really know what needs to be done here.

  1. Right now vscode auto complete will frequently suggest importing stuff as if it's a .mjs file. It would be preferable if the import syntax we used in the project was consistent with using .mts
  2. The linter is currently agnostic with whether the override term should be included when a class overrides a parent function, it only throws an error if you mark something as an override when there isn't a parent function. We should adjust to throw an error if there isn't an override call when there should be.
kmoschcau commented 1 month ago

Alright, two lints. Yeah I'll look into that.

kmoschcau commented 1 month ago

I got both working and will put up a PR in a moment. The import checks have an issue though.

LukeAbby commented 1 month ago

Closing as completed in #2638.