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

Cannot run command standard in a React native project #1012

Closed
ansonyao opened this issue Nov 3, 2017 · 2 comments

Comments

@ansonyao
Copy link

commented Nov 3, 2017

I just installed today.
When I run command standard. The following error shows up.

RangeError: Line number out of range (line 30 requested, but only 29 lines present).
at SourceCode.getIndexFromLoc (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/util/source-code.js:389:19)
at Object.fix (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/rules/no-multiple-empty-lines.js:116:52)
at RuleContext.report (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/rule-context.js:127:34)
at Program:exit.allLines.reduce.concat.reduce (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/rules/no-multiple-empty-lines.js:108:37)
at Array.reduce (native)
at EventEmitter.Program:exit (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/rules/no-multiple-empty-lines.js:93:22)
at emitOne (events.js:101:20)
at EventEmitter.emit (events.js:188:7)
at NodeEventGenerator.applySelector (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/util/node-event-generator.js:265:26)
at NodeEventGenerator.applySelectors (/usr/local/lib/node_modules/standard/node_modules/eslint/lib/util/node-event-generator.js:294:22)

@Flet Flet added the v11 release label Dec 15, 2017

@Flet

This comment has been minimized.

Copy link
Member

commented Dec 15, 2017

This looks like its related to #997 and #833, which is due to an eslint bug.

We just released a beta for the next version of standard, which includes upgrading eslint, Can you try installing npm install standard@beta and see if it fixes it?

@feross feross added this to the standard v11 milestone Feb 17, 2018

@feross

This comment has been minimized.

Copy link
Member

commented Feb 19, 2018

🗣 Standard 11 is released! Run npm install standard@latest --save-dev to update to the latest version. This will also update the version in package.json

Changelog: https://github.com/standard/standard/blob/master/CHANGELOG.md#1100---2018-02-18

@feross feross closed this Feb 19, 2018

@lock lock bot locked as resolved and limited conversation to collaborators May 25, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.