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.

False positive 'newline-after-var' with 'semi': never

See original GitHub issue

What version of ESLint are you using? 3.2.2

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

Please show your full configuration: https://github.com/wKich/eslint-config-skbkontur-keforms

What did you do? Please include the actual source code causing the issue.

const foo = {}

;(foo.bar || []).doSomething()

What did you expect to happen? Don’t get any warnings or errors.

What actually happened? Please include the actual, raw output from ESLint. Get newline-after-var warning

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mysticateacommented, Aug 5, 2016

I will work on this.

1reaction
vitorbalcommented, Aug 4, 2016

Thanks! I can confirm this as well, with the following config and test file:

{
    "root": true,
    "rules": {
        "semi": ["error", "never"],
        "newline-after-var": ["error"]
    }
}

var foo = bar

;(1 || 2).baz()

Results in:

$ npm run lint

> eslint_bug_tester@1.0.0 lint /Users/vitorbalocco/Workspace/eslint_bug_tester
> eslint src/


/Users/vitorbalocco/Workspace/eslint_bug_tester/src/test.js
  1:1  error  Expected blank line after variable declarations  newline-after-var

✖ 1 problem (1 error, 0 warnings)
Read more comments on GitHub >

github_iconTop Results From Across the Web

newline-after-var - 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 >
eslint-config-canonical - npm
Rule CN AB GG SD XO @babel/new‑cap ❌ 👻 👻 👻 👻 @babel/no‑invalid‑this 🚨 👻 👻 👻 👻 @babel/no‑unused‑expressions 🚨 👻 👻 👻 👻
Read more >
typescript-eslint/no-unused-vars does not work correctly
After @typescript-eslint upgrade es-lint started throwing the following lint errors: 28:15 error 'token' is defined but never used ...
Read more >
6. Iteration — How to Think Like a Computer Scientist
Notice that if the condition is false the first time through the loop, the statements inside the loop are never executed. The body...
Read more >
eslint-plugin-jsdoc - npm Package Health Analysis - Snyk
We found that eslint-plugin-jsdoc demonstrates a positive version release ... Recommended "jsdoc/newline-after-description": 1, ... Defaults to false .
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