Skip to content

chore: remove else after return and JSDoc type braces - #2987

Merged
jcosta33 merged 1 commit into
mainfrom
chore-lint-autofix-else-return-jsdoc-types
Nov 9, 2026
Merged

jcosta33 merged 1 commit into
mainfrom
chore-lint-autofix-else-return-jsdoc-types

Conversation

@jcosta33

@jcosta33 jcosta33 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Clears the autofixable warnings that the code-quality rules in Frontify/code-style#161 raise in fondue, ahead of that config landing here.

  • no-else-return: 13 else blocks after a return become plain code after the if. No behavior change.
  • jsdoc/no-types: removes {Type} braces from @param and @returns in TypeScript files, since TypeScript already carries the types. @returns tags that held only a type are removed.
  • jsdoc/require-hyphen-before-param-description: @param name text becomes @param name - text.

The other new warnings (complexity, nesting depth, parameter count, parameter reassignment, import cycles) need hand refactoring and are not part of this change. The switch-exhaustiveness-check autofix is left out because it inserts cases that throw at runtime.

Applies the safe autofixes for no-else-return, jsdoc/no-types and
jsdoc/require-hyphen-before-param-description. Drops @returns tags that
only carried a type. No behavior change.
@jcosta33
jcosta33 marked this pull request as ready for review November 9, 2026 11:22
@jcosta33
jcosta33 requested review from a team as code owners November 9, 2026 11:22
@peter-tudosa
peter-tudosa removed the request for review from silviojaeger November 9, 2026 11:24
@changeset-bot

changeset-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5d2862f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jcosta33

jcosta33 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

mergin as this is essentially linting autofix stuff with no impact on behavior

@jcosta33
jcosta33 merged commit 84ef7c8 into main Nov 9, 2026
@jcosta33
jcosta33 deleted the chore-lint-autofix-else-return-jsdoc-types branch November 9, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants