8000 Bug: [comma-spacing] conflicts with array-bracket-spacing · Issue #6874 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

Bug: [comma-spacing] conflicts with array-bracket-spacing #6874

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

Closed
4 tasks done
alecrobertson1 opened this issue Apr 9, 2023 · 1 comment · Fixed by #6938
Closed
4 tasks done

Bug: [comma-spacing] conflicts with array-bracket-spacing #6874

alecrobertson1 opened this issue Apr 9, 2023 · 1 comment · Fixed by #6938
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working formatting Related to whitespace/bracket formatting. We strongly recommend you use a formatter instead. package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@alecrobertson1
Copy link

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Playground Link

https://typescript-eslint.io/play/#ts=5.0.2&sourceType=module&code=NocgbghgNgrgpiANAAnNeAmJyC6Q&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQIbWlwE8BaAI0IGMBrRAFxOQAddKBLAOwHN0pECA9tEgAacNkgABOkSYpK0NkwYp4nOgHpKAgLY7cjFu269I-aEMjiAviGtA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA

Repro Code

['value', 'value2',]

ESLint Config

module.exports = {
  parser: "@typescript-eslint/parser",
  rules: {
    "array-bracket-spacing": "error",
    "@typescript-eslint/comma-spacing": "error"
  }
};

tsconfig

No response

Expected Result

[comma-spacing] should not throw an error, as there should not be a space between a trailing comma in an array and the closing "]" bracket.

Actual Result

[comma-spacing] throws an error, "A space is required after ','".

Additional Info

This issue was fixed in ESLint's [comma-spacing] rule here: eslint/eslint#16113.

@alecrobertson1 alecrobertson1 added bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Apr 9, 2023
@Josh-Cena Josh-Cena added formatting Related to whitespace/bracket formatting. We strongly recommend you use a formatter instead. accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Apr 9, 2023
@Josh-Cena
Copy link
Member

Yes, I think we should sync with upstream

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working formatting Related to whitespace/bracket formatting. We strongly recommend you use a formatter instead. package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants
0