question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

comma-dangle doesn't report functions when using string option

See original GitHub issue

Tell us about your environment

  • ESLint Version: 6.1.0
  • Node Version: 12.7.0
  • npm Version: 6.10.2

What parser (default, Babel-ESLint, etc.) are you using? default

Please show your full configuration:

Configuration
{
    "comma-dangle": ["error", "always"]
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

foo(a)

What did you expect to happen? I expected it to warn about the missing trailing comma after a. This is true no matter which string option I’m using. I saw that comma-dangle changed in 6.0.0 so I’m guessing it has something to do with that.

What actually happened? Please include the actual, raw output from ESLint. No errors were reported.

Are you willing to submit a pull request to fix this bug? Yes

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
kaicataldocommented, Nov 4, 2019

It’s unfortunate that it causes a lot more errors, but I do think this was the intended behavior and is a bug that should be fixed.

1reaction
platinumazurecommented, Nov 2, 2019

I would be okay with reverting the change in semver-patch and deferring to semver-major, personally. I don’t think this level of breakage was intended (at least, I wasn’t intending it).

Probably best to add this to the TSC’s agenda.

@mojavelinux Could you please open a new issue, so we can track this more easily? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

comma-dangle - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Why does this trigger comma-dangle rule in eslint?
Based on the airbnb config the rule is setup like this comma-dangle: [2, "always-multiline"] . Acoording to this, The expected code is
Read more >
comma-dangle | typescript-eslint
Require or disallow trailing commas. Some problems reported by this rule are automatically fixable by the --fix ESLint command line option.
Read more >
eslint-plugin-flowtype - npm
Start using eslint-plugin-flowtype in your project by running `npm i ... The --fix option on the command line automatically fixes problems reported by...
Read more >
enforce consistent line breaks inside function parentheses ...
Options. This rule has a single option, which can either be a string or an object. "always" requires line breaks inside all function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found