Unexpected behavior in comma-dangle, always-multiline: true
See original GitHub issueversion 2.2.0
ESLint raised a warning for the following code:
const oneThing = [
2, 8
];
IMO, it should not, as the array items are on a single line.
Issue Analytics
- State:
- Created 8 years ago
- Comments:36 (28 by maintainers)
Top Results From Across the Web
eslint/tslint behavior difference with comma-dangle #1122
eslint/tslint behavior difference with comma-dangle #1122 ... repro.ts 5:4 error Unexpected trailing comma comma-dangle.
Read more >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 >eslint-plugin-flowtype - npm
If it is 'always-multiline' then a problem is raised when there is no trailing comma on a multi-line definition, or there is a...
Read more >T222707 switch eslint to require dangling comma with "always ...
Having a dangling comma in multiline javascript objects and arrays results in cleaner commit diffs if the last line is removed or an...
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 Free
Top 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
I’ll take it.
The best work is no work. Let’s close it.