solidjs-community / eslint-plugin-solid

Solid-specific linting rules for ESLint.
MIT License
209 stars 24 forks source link

Update rules to use typescript-eslint RuleCreator #88

Closed joshwilsonvu closed 1 year ago

joshwilsonvu commented 1 year ago

I came across https://typescript-eslint.io/custom-rules#rulecreator and found it to be nicer to work with than manually writing out the TSESLint.RuleModule<MessageIds, Options> type. The const createRule = ESLintUtils.RuleCreator.withoutDocs snippet isn't because there aren't docs; it's because those are already formatted with eslint-plugin-eslint-plugin, and it works better with a simple function call syntax.

The fixture test was taking a long time, so I put everything it checks for into one test so that it doesn't have to run ESLint multiple times.

Added other housekeeping, like support for TS satisfies, dependency version bumps, npm keywords, using a handy generator function for the fixer in no-destructure.