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

Fix comma-dangle schema #13739

Closed
mdjermanovic opened this issue Oct 6, 2020 · 1 comment · Fixed by #14030
Closed

Fix comma-dangle schema #13739

mdjermanovic opened this issue Oct 6, 2020 · 1 comment · Fixed by #14030
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@mdjermanovic
Copy link
Member

mdjermanovic commented Oct 6, 2020

comma-dangle schema should be fixed to allow only 1 element (either string or object, not string + object) in the configuration array, since the rule reads only the first element and ignores the rest:

This rule has a string option or an object option:

{
    "comma-dangle": ["error", "never"],
    // or
    "comma-dangle": ["error", {
        "arrays": "never",
        "objects": "never",
        "imports": "never",
        "exports": "never",
        "functions": "never"
    }]
}

Allowing multiple elements can be misleading, as in #13165. Users might expect that an additional object can be used to override the string option.

We already fixed this in #13166 but reverted the change in #13564 per the semver policy, so this is a task for the next major version.

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion breaking This change is backwards-incompatible labels Oct 6, 2020
@mdjermanovic mdjermanovic self-assigned this Oct 6, 2020
@masparasol
Copy link

masparasol commented Oct 23, 2020

This is a bit random, but I just funded this issue with a $2 bounty on Rysolv.com here: https://rysolv.com/issues/detail/0c32204b-018e-4e55-b043-0fab6079f6fd

Sorry if this comes off as spam, a friend of mine started the site and I funded the issue $2 to test it. Thought it might be fun if you want to claim it. It would require you to sign up to the site, so I understand if you don't want to spend the time, but just thought to mention it.

Thanks for working on the ES Lint project! :)

mrlorentx added a commit to mrlorentx/eslint that referenced this issue Jan 23, 2021
mrlorentx added a commit to mrlorentx/eslint that referenced this issue Jan 23, 2021
@mdjermanovic mdjermanovic added this to Need Discussion in v8.0.0 Apr 7, 2021
@mdjermanovic mdjermanovic moved this from Need Discussion to Planned in v8.0.0 Apr 7, 2021
@mdjermanovic mdjermanovic moved this from Planned to Pull Request Opened in v8.0.0 Apr 7, 2021
@mdjermanovic mdjermanovic added this to Needs Triage in Triage via automation Apr 7, 2021
@mdjermanovic mdjermanovic moved this from Needs Triage to Pull Request Opened in Triage Apr 7, 2021
@nzakas nzakas moved this from Pull Request Opened to Ready for Merge in v8.0.0 Jun 17, 2021
Triage automation moved this from Pull Request Opened to Complete Aug 5, 2021
v8.0.0 automation moved this from Ready for Merge to Done Aug 5, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Feb 2, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
Triage
Complete
v8.0.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants