Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
MatthiasKunnen opened this issue Mar 12, 2021 · 1 comment · Fixed by #3176
Closed
3 tasks done

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

MatthiasKunnen opened this issue Mar 12, 2021 · 1 comment · Fixed by #3176
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@MatthiasKunnen
Copy link
Contributor

  • 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
@MatthiasKunnen MatthiasKunnen added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Mar 12, 2021
@bradzacher bradzacher added enhancement: plugin rule option New rule option for an existing eslint-plugin rule and removed triage Waiting for maintainers to take a look labels Mar 12, 2021
@bradzacher
Copy link
Member

happy to accept a PR to add support!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: plugin rule option New rule option for an existing eslint-plugin rule package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants