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

2.13 regression: no-multiple-empty-lines breaks on files without line breaks #6449

Closed
strawbrary opened this issue Jun 17, 2016 · 1 comment
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

@strawbrary
Copy link
Contributor

strawbrary commented Jun 17, 2016

What version of ESLint are you using?
2.13.0

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

Please show your full configuration:

{
  "rules": {
    "no-multiple-empty-lines": [2, { max: 2, maxEOF: 1 }]
  }
}

What did you do? Please include the actual source code causing the issue.
Run eslint against a file with no line breaks.

var a = 5;

What did you expect to happen?
Run without error

What actually happened? Please include the actual, raw output from ESLint.

Cannot read property 'length' of null
TypeError: Cannot read property 'length' of null
    at /Users/strawbrary/projects/chell/node_modules/eslint/lib/rules/no-multiple-empty-lines.js:101:47
    at Array.forEach (native)
    at EventEmitter.checkBlankLines (/Users/strawbrary/projects/chell/node_modules/eslint/lib/rules/no-multiple-empty-lines.js:100:23)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)
    at NodeEventGenerator.leaveNode (/Users/strawbrary/projects/chell/node_modules/eslint/lib/util/node-event-generator.js:49:22)
    at CodePathAnalyzer.leaveNode (/Users/strawbrary/projects/chell/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:627:23)
    at CommentEventGenerator.leaveNode (/Users/strawbrary/projects/chell/node_modules/eslint/lib/util/comment-event-generator.js:110:23)
    at Controller.traverser.traverse.leave (/Users/strawbrary/projects/chell/node_modules/eslint/lib/eslint.js:908:36)
    at Controller.__execute (/Users/strawbrary/projects/chell/node_modules/estraverse/estraverse.js:397:31)

Submitted #6451 as a fix.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Jun 17, 2016
@strawbrary strawbrary changed the title no-multiple-empty-lines breaks on files without line breaks 2.13 regression: no-multiple-empty-lines breaks on files without line breaks Jun 17, 2016
@nzakas nzakas added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Jun 17, 2016
@nzakas
Copy link
Member

nzakas commented Jun 17, 2016

Yikes, sorry about that.

azu added a commit to textlint/textlint that referenced this issue Jun 18, 2016
* chore(npm): update devDeps

* chore(eslint): avoid error no-multiple-empty-lines

eslint/eslint#6449
eslint/eslint#6451
@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

No branches or pull requests

3 participants