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.

proposal: add `--fix` to `one-var`

See original GitHub issue
// one-var: ["error", "never"]
const foo = 0,
  bar = 1;

can be fixed to:

const foo = 0;
const bar = 1;

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
j-f1commented, Nov 26, 2017

I’m taking a look at this, although I’m only going to attempt fixes for cases where the two var declarations are next to each other (var a = 2; var b = 3, not var a = 2; for (var b in foo) {})

2reactions
not-an-aardvarkcommented, Aug 14, 2017

No worries, thanks for attempting it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Single Var Pattern in JavaScript - WebFX
In the single var pattern, all local variables are created using only one var statement. The statement is placed at the start of...
Read more >
{8} Future Releases, Workflow Oriented - WordPress Trac
Ticket Summary Component Priority Severity Mil... #38805 A hook is missing in class WP_List_Table Administration normal major Aw... #36201 Admin Pagination URLs Use Wrong Hostname...
Read more >
eslint | Yarn - Package Manager
A bug fix to the CLI or core (including formatters). Improvements to documentation. Non-user-facing changes such as refactoring code, adding, deleting, or ...
Read more >
5069 (ui.tabs.add creates two tab panels when using a full URL)
When creating a new tab by passing in a full URL to ui.tabs.add, two tab panels are added to the DOM—one ... A...
Read more >
JDK-8191842 JShell: Inferred type information is lost ... - Bug ID
JDK-8177466 - Add compiler support for local variable type-inference ... forEach(a -> System.out.println(a.i)); But not for this one: var list = Stream.of(1 ...
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