GMOD / Apollo3

JBrowse 2 plugin for editing annotations on an Apollo server
Apache License 2.0
7 stars 4 forks source link

Enable `@typescript-eslint/strict-type-checked` preset #392

Closed garrettjstevens closed 4 months ago

garrettjstevens commented 4 months ago

This PR enables a set of lint rules provided by @typescript/eslint called "strict-type-checked", replacing the "strict" preset we used before.

This set of rules uses TypeScript types to inform the linter, allowing it to catch even more potential problems. I've avoided enabling this before because it revealed too many lint errors in our code to deal with all at once. After seeing how useful some of these lint rules would have been when working on transitioning to the new feature model, I decided to take a different approach. I enabled the rule set and fixed a few problems, and then added eslint-disable directives to suppress all the other problems on a per-file basis.

Going forward, we can gradually remove these eslint-disable directives from a few files at a time. Anytime we touch a file when submitting a PR, we should probably try to address any eslint-disable directives in that file. Also, if you find you have a bit of time between bigger PRs, removing and fixing the eslint-disable directives in one or two files would be great.