Skip to content

[object-curly-spacing] Rule does not apply to MappedType #3175

@MatthiasKunnen

Description

@MatthiasKunnen
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

{
  "rules": {
    "@typescript-eslint/object-curly-spacing": ["error", "never"]
  }
}
var d: { [k in 'string' | 'data']: any };

Expected Result
I am expecting the linter to complain about the space after the { and the space before the }.

Actual Result

The linter happily accepts this code.

Additional Info

I've tested this issue on 946ee3b and could reproduce it.
I'm working on a PR to first test, and then fix this.

Versions

package version
@typescript-eslint/eslint-plugin 4.17.0
@typescript-eslint/parser 4.17.0
TypeScript 4.2.2
ESLint 7.20.0
node 12.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions