Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wKich opened this issue Aug 3, 2016 · 5 comments · Fixed by #6847
Closed

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

wKich opened this issue Aug 3, 2016 · 5 comments · Fixed by #6847
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@wKich
Copy link
Contributor

wKich commented Aug 3, 2016

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

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Aug 3, 2016
@vitorbal
Copy link
Member

vitorbal commented Aug 3, 2016

Thanks for reaching out, @wKich! To help us, could you please post the raw output from ESLint when it runs and produces the warning you described?

@vitorbal vitorbal added the needs info Not enough information has been provided to triage this issue label Aug 3, 2016
@eslintbot
Copy link

Hi @wKich, thanks for the issue. It looks like there's not enough information for us to know how to help you.

If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.

Requesting a rule change? Please see Proposing a Rule Change for instructions.

If it's something else, please just provide as much additional information as possible. Thanks!

@wKich
Copy link
Contributor Author

wKich commented Aug 4, 2016

@vitorbal, sorry for didn't post output right away. Here it is
screen shot 2016-08-04 at 10 32 23

@vitorbal
Copy link
Member

vitorbal commented 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)

@vitorbal vitorbal added bug ESLint is working incorrectly evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion and removed needs info Not enough information has been provided to triage this issue triage An ESLint team member will look at this issue soon evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Aug 4, 2016
@mysticatea
Copy link
Member

I will work on this.

@mysticatea mysticatea self-assigned this Aug 8, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants