comma-dangle doesn't report functions when using string option
See original GitHub issueTell 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:
- Created 4 years ago
- Comments:22 (11 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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!