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

Irregular whitespace not allowed #392

Closed
dylanparry opened this issue Jan 27, 2016 · 1 comment

Comments

@dylanparry
Copy link

commented Jan 27, 2016

Hi,

I’m getting the error “Irregular whitespace not allowed” when I run standard on any of my files. I’ve created a project in VS2015, and am running my scripts via Task Runner Explorer and the NPM scripts extension—I run all my scripts this way, and have no problems with Webpack etc.

I’ve set up a script in my package.json to run standard against all JS/JSX files in my JavaScript directory, and using the babel-eslint parser. All my files are using ES6/ES7 syntax.

The error occurs for any file that I run it against. I’ve tried running it on specific files, and they all get the same error.

Any ideas?

> cmd.exe /c npm run lint --color=always
> NPM@1.0.0 lint E:\Documents\Visual Studio Projects\electricfreedom\ElectricFreedom.WebUI
> standard JavaScript/**/*.js* --parser babel-eslint
standard: Use JavaScript Standard Style (https://github.com/feross/standard) 
  E:\Documents\Visual Studio Projects\electricfreedom\ElectricFreedom.WebUI\JavaScript\admin\Actions\AlbumActions.js:1:1: Irregular whitespace not allowed
npm ERR! NPM@1.0.0 lint: `standard JavaScript/**/*.js* --parser babel-eslint`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the NPM@1.0.0 lint script.
npm ERR! This is most likely a problem with the NPM package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     standard JavaScript/**/*.js* --parser babel-eslint
npm ERR! You can get their info via:
npm ERR!     npm owner ls NPM
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\\\node\\node" "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\Extensions\\Microsoft\\Web Tools\\External\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "lint" "--color=always"
npm ERR! cwd E:\Documents\Visual Studio Projects\electricfreedom\ElectricFreedom.WebUI
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
Process terminated with code 1.
@dylanparry

This comment has been minimized.

Copy link
Author

commented Jan 27, 2016

Seems this is caused by #283 and Visual Studio automatically adding in the BEM character at the start of the file. I have installed and extension (https://vlasovstudio.com/fix-file-encoding/) to fix this.

@dylanparry dylanparry closed this Jan 27, 2016

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

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