Skip to content

[key-spacing] key-spacing of interfaces and other TS-specific key-value pairs #940

@lolmaus

Description

@lolmaus

Repro

{
  "rules": {
    "key-spacing": ["error", { "align": "value" }]
  }
}
interface Foo {
  foo: string;
  barBazQuux: string;
}

Expected Result

Should be highlighted as an error and auto fixed into:

interface Foo {
  foo:        string;
  barBazQuux: string;
}

Actual Result

ESLint ignores interfaces.

Additional Info

Time for @typescript-eslint/key-spacing?

Versions

package version
@typescript-eslint/eslint-plugin 2.0.0
@typescript-eslint/parser 2.0.0
TypeScript 3.6.2
ESLint 5.16.0
node 12.9.0
yarn 1.17.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseformattingRelated to whitespace/bracket formatting. We strongly recommend you use a formatter instead.good first issueGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy