Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[no-type-alias] Support enforcing the inverse #142

Closed
Labels
breaking changeThis change will require a new major version to be releasedenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Milestone
@sindresorhus

Description

@sindresorhus

Similar to my#103 issue.

Theno-type-alias rule enforcesnot using type aliases, but I would like to enforceuse of type aliases whenever possible. I actually prefer them, and most of the type alias limitations that existed when the original TSLintinterface-over-type-literal rule was created has since gone away.

I would suggest renaming the rule totype-alias (without theno- prefix) and support enforcing bothuse andnon-use of type alias.

Relevant:

In short, the only differences are:

  1. A class cannot implement / extend a type alias that names a union type.
  2. Declaration merging doesn't work with type aliases.

Personally, I would like to use enforce type aliases whenever possible, which means all the time, except for number1.. I don't use declaration merging.

I also noticed there's aprefer-interface rule which seems to overlap with this one. It should probably be merged into this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeThis change will require a new major version to be releasedenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp