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.

Unexpected behavior in comma-dangle, always-multiline: true

See original GitHub issue

version 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:closed
  • Created 8 years ago
  • Comments:36 (28 by maintainers)

github_iconTop GitHub Comments

2reactions
albertocommented, Mar 14, 2016

I’ll take it.

0reactions
nzakascommented, Apr 6, 2016

The best work is no work. Let’s close it.

Read more comments on GitHub >

github_iconTop 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 >

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