Skip to content

v3.5.0

Choose a tag to compare

@github-actions github-actions released this 18 Oct 18:09
· 123 commits to main since this release
v3.5.0
d3f58ec

v3.5.0: New optional-parameter rule and imported-type name fixes

prefer-optional-parameter is a new rule that reports undefined in parameter unions. starts-with-verb and require-async-suffix no longer report object keys whose names an imported type dictates.

🚀 Added

  • prefer-optional-parameter: The rule reports undefined in a parameter's type union, such as scenario: ScenarioId | undefined, and autofixes it to scenario?: ScenarioId where TypeScript allows ?; elsewhere, such as before a required parameter or on an accessor setter, it reports without a fix. - by @howmanysmall in #93

🐞 Fixed

  • starts-with-verb: The rule no longer reports callback names in an object literal annotated with an imported type or asserted with as or <T> to one, including through a local alias; names constrained only by local types still report. Previously viteFinal(viteConfiguration): InlineConfig {...} in const configuration: StorybookConfig = {...} reported. - by @howmanysmall in #92
  • require-async-suffix: The rule no longer reports async methods in an object literal annotated with an imported type, including through a local alias; methods typed only by a local type still report. Previously async getAll() in an object annotated with an imported ServerConfiguration reported as missing the Async suffix. - by @howmanysmall in #92

Full Changelog: v3.4.0...v3.5.0