Skip to content

0.5.0

Choose a tag to compare

@timmo001 timmo001 released this 29 Sep 20:18
· 68 commits to main since this release

New rules, all enabled in the recommended configs:

  • timmo/no-untyped-custom-event reports CustomEvent used as a type without a detail type, which leaves detail as any.
  • timmo/no-explicit-inferable-type-predicate reports explicit x is T predicates that TypeScript already infers, on non-exported functions whose body is only a null, typeof or instanceof check.
  • timmo/prefer-lit-query-decorators follows eslint-plugin-lit's prefer-query-decorators, including its options and settings.lit.elementBaseClasses, and also catches this.shadowRoot!, ?. and asserted render roots. It only reports static selectors. Turn off lit/prefer-query-decorators when using it.
  • timmo/no-unchecked-query-selector-type reports type arguments on querySelector, querySelectorAll and closest, which cast the result without checking it.
  • timmo-effect/prefer-platform-services (in recommended-effect) reports Node child_process and fs and Bun's spawn, spawnSync, $, file and write in modules that import Effect. Use ChildProcessSpawner and FileSystem instead. fetch is not reported.

Other changes:

  • timmo/prefer-event-parameter-type now also reports casts on detail and nested detail members. timmo/prefer-types-over-assertions skips those so they are not reported twice.
  • The recommended configs now enable typescript/no-non-null-assertion, typescript/no-unnecessary-type-arguments, typescript/no-unnecessary-type-assertion and typescript/no-unnecessary-type-parameters as errors. The last three need typeAware.
  • Rule helpers are shared across plugins, and the copy command copies them too.
  • Pin the shared GitHub workflows to 20260929.0.

Full Changelog: 0.4.0...0.5.0