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

Raise correct error on single semicolon #1004

Closed
ai opened this issue Apr 12, 2017 · 11 comments
Closed

Raise correct error on single semicolon #1004

ai opened this issue Apr 12, 2017 · 11 comments
Labels
Milestone

Comments

@ai
Copy link
Member

ai commented Apr 12, 2017

Input:

:

Current error:

//usr/share/code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28 TypeError: Cannot read property '0' of undefined
     at Parser.decl (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parser.js:203:25)
     at Parser.other (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parser.js:170:18)
     at Parser.loop (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parser.js:81:26)
     at parse (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parse.js:26:16)
     at new LazyResult (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/lazy-result.js:70:24)
     at Processor.process (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/processor.js:117:12)
     at getCode.then.e (/home/svipben/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/stylelint/lib/getPostcssResult.js:83:29)

Expected error: CssSyntaxError.

Origin issue: postcss/postcss-scss#57 and https://github.com/shinnn/vscode-stylelint/issues/65#issuecomment-292880983

/cc @svipben @shinnn

@ai
Copy link
Member Author

ai commented Apr 12, 2017

Done 4adaf97

But fix will be released only in next 6.0.

@ai ai closed this as completed Apr 12, 2017
@ai ai added this to the 6.0 milestone Apr 12, 2017
@shinnn
Copy link
Contributor

shinnn commented Apr 12, 2017

Great work, @ai.

@equinusocio
Copy link

equinusocio commented May 12, 2017

I get the same error with gulp-postcssthat use postcss 6.0

@ai
Copy link
Member Author

ai commented May 12, 2017

@equinusocio give me more information. Stacktrace, input CSS

@equinusocio
Copy link

equinusocio commented May 12, 2017

I'm using gulp-postcss 7.0.0 with postcss-cssnext 2.10.0 and I'm using .postcss file extension. Every time i write a selector that start with : i get this error:

TypeError: Cannot read property '0' of undefined at Parser.decl (/Users/equinusocio/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parser.js:203:25) at Parser.other (/Users/equinusocio/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parser.js:170:18) at Parser.loop (/Users/equinusocio/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss/lib/parser.js:81:26) at parse (/Users/equinusocio/.vscode/extensions/shinnn.stylelint-0.24.0/

@ai
Copy link
Member Author

ai commented May 12, 2017

Can you check PostCSS version in /Users/equinusocio/.vscode/extensions/shinnn.stylelint-0.24.0/node_modules/postcss?

@equinusocio
Copy link

equinusocio commented May 12, 2017

"version": "5.2.16"

So shinnn.stylelint extension is using an old postcss version?

@shinnn
Copy link
Contributor

shinnn commented May 12, 2017

shinnn.stylelint is not gulp-postcss.

@equinusocio
Copy link

equinusocio commented May 12, 2017

@shinnn Yes i know, but I didn't know what was the caused. I didn't know that the stylelint extension was using postcss. You closed https://github.com/shinnn/vscode-stylelint/issues/73

@shinnn
Copy link
Contributor

shinnn commented May 12, 2017

vscode-stylelint is just a wrapper for stylelint, which still uses PostCSS 5.x. Wait for stylelint/stylelint#2561 being merged.

@equinusocio
Copy link

Ok thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants