Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gajus/eslint-plugin-jsdoc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v64.3.1
Choose a base ref
...
head repository: gajus/eslint-plugin-jsdoc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v64.3.2
Choose a head ref
  • 12 commits
  • 15 files changed
  • 1 contributor

Commits on Aug 30, 2026

  1. Configuration menu
    Copy the full SHA
    801b4ce View commit details
    Browse the repository at this point in the history
  2. fix(no-unnecessary-type-assertion): build on naive initial implemen…

    …tation to better support arrays and objects
    brettz9 committed Aug 30, 2026
    Configuration menu
    Copy the full SHA
    b41f175 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2aaea71 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    15f11dd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9296dbb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4e56312 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c6bd176 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a82938b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    46c5efe View commit details
    Browse the repository at this point in the history
  10. fix(no-unnecessary-type-assertion): skip mismatched nested casts

    When an inline `@type` comment binds to an inner parenthesized sub-expression
    that is then a member or argument of an outer cast's operand — e.g.
    `/** @type {DOMException} */ (reader.error).message` inside
    `/** @type {string} */ (...)` — the rule resolved the outer paren's type tag
    while reporting and fixing against the inner comment. The fixer's replacement
    range then spanned the wrong parentheses, deleting the outer `)` and producing
    syntactically invalid output.
    
    Require the `@type` tag TypeScript resolves for the parenthesized expression to
    be the same comment currently being iterated; bail otherwise. This removes the
    false positive and the broken autofix.
    brettz9 committed Aug 30, 2026
    Configuration menu
    Copy the full SHA
    e463504 View commit details
    Browse the repository at this point in the history
  11. fix(no-unnecessary-type-assertion): skip interpolated template lite…

    …rals
    
    A template literal with interpolations (`` `${x}Reference` ``) widens to
    `string` on its own, but a surrounding `@type` (an inline cast or a
    declaration) contextually narrows it to a template-literal type. So
    `getTypeAtLocation` echoes the asserted literal back, and a genuine narrowing
    (the expression really being `string`, asserted as a string-literal union)
    looks redundant.
    
    Skip such expressions in both the cast and `VariableDeclaration` branches,
    matching `@typescript-eslint/no-unnecessary-type-assertion`'s
    `!isTemplateLiteralWithExpressions` carve-out. Plain template literals with no
    interpolation keep their literal type regardless of context and are still
    checked.
    brettz9 committed Aug 30, 2026
    Configuration menu
    Copy the full SHA
    01caf39 View commit details
    Browse the repository at this point in the history
  12. fix(no-unnecessary-type-assertion): don't flag placeholder unions

    `cond ? [] : {}` infers `never[] | {}`, a union that fell through to the
    primitive path and passed the unidirectional `isTypeAssignableTo` check against
    e.g. `{[key: string | number]: any}` (empty types satisfy an index signature
    vacuously), so the assertion looked redundant even though removing it breaks
    later indexed access.
    
    Extract an `isPlaceholderType` helper (`any`/`never`/`null`/`undefined`, an
    empty array or object, `any[]`), reuse it for the existing array- and
    object-branch placeholder guards, and add a union guard: an inferred union
    whose every constituent is a placeholder carries no shape to compare, so the
    assertion is supplying real type information and is not redundant.
    brettz9 committed Aug 30, 2026
    Configuration menu
    Copy the full SHA
    68dd6c8 View commit details
    Browse the repository at this point in the history
Loading