Skip to content

type-formatting should default to double quotes #1556

@Zamiell

Description

@Zamiell

By default, the jsdoc/type-formatting rule fixes this:

/** @type {import("typedoc").TypeDocOptions} */

To this:

/** @type {import('typedoc').TypeDocOptions} */

It is possible for users to set the stringQuotes option to "single" or "double" to customize this behavior. However, the rule should default to "double", since that matches the defaults of Prettier, which is the most popular formatter in the JavaScript/TypeScript ecosystem.

In my opinion, this JSDoc plugin should not be creating its own formatting opinions that disagree with Prettier, as it fractures the ecosystem more than it already is. Furthermore, it seems likely that a lot (maybe even most?) of eslint-plugin-jsdoc users will also be using Prettier, so it seems desirable to keep the two in sync.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions