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

Constantly getting 'irregular whitespace' when using || #455

Closed
Cuel opened this issue Mar 10, 2016 · 3 comments

Comments

@Cuel
Copy link

commented Mar 10, 2016

Hi. I'm using Atom with this editorconfig

root = true
[*]
end_of_line = crlf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 2

.eslintrc

{
  "extends": ["standard"]
}

EDIT:
I'm not entirely sure when it happens. It seems to be when strings are involved, e.g this will always cause it

let a = {raw: {channels: [{channel_name: 'test', cid: '979'}]}}
let root = a.raw.channels.find(v => v.channel_name === 'test' || v.cid === '979')

The above always results in Irregular whitespace not allowed at line xx
Happens on both Mac and Windows
The position is always just before the ||
I can fix it temporarly by going to the position, pressing backspace and space again.
It works until I open the file again. I'm not sure if this is a standard, eslint or atom issue.

Is this a known issue?

@feross

This comment has been minimized.

Copy link
Member

commented Mar 11, 2016

I can't think of how this could be caused by standard.

It's worth noting that on OS X typing ALT+SPACE inserts a non-breaking space character (which looks the same as a space, but isn't a normal space). Maybe that's the issue?

No idea how the issue could come back when you re-open the file. Sounds like your editor is modifying files automatically when they're opened.

@feross feross closed this Mar 11, 2016

@Cuel

This comment has been minimized.

Copy link
Author

commented Mar 11, 2016

It's not alt+space, that's for sure. I'm using editorconfig which is the only package capable of editing files when opened afaik. I'll keep looking

@LinusU

This comment has been minimized.

Copy link
Member

commented Mar 11, 2016

You could open the file in a hex editor to see what got inserted

@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.
3 participants
You can’t perform that action at this time.