question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore parse errors

See original GitHub issue

csso can’t minify some legacy styles because of parse errors.

csso "styles.css" "styles.min.css"

Parse error X:\project\css\styles.css: Unexpected input
 3354 |.Notes {
 3355 | padding:0px
 3356 | display:block;
---------------^
 3357 | width:420px;
 3358 | float:right;

I understand that ignoring could slow parsing and I really need to fix all errors, but right now I don’t need linting, my target is only minification.

Is there a way to ignore parse errors?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielRufcommented, Apr 20, 2020

I would welcome some solution like in clean-css which uses /* clean-css ignore:start */ and /* clean-css ignore:end */.

0reactions
lahmatiycommented, Apr 12, 2017

Yep, it looks reasonable. But if optimizer would removes some parts of CSS silently it might be a source of problems. Some parts may to be wrong, but others may to be correct but parser/optimizer just can’t understand them. I don’t know good enough solution for this problem yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ignore Json parse error? - Stack Overflow
How to ignore Json parse error? · first check if JSON object has that object then parse it. like this if(jsonObject.has("object")) String str= ......
Read more >
Ignore parse errors? (TypeScript) · Issue #1087 - GitHub
What I want is to only see rule errors from ESLint in VSCode, not parse errors (since I already get that from TypeScript)....
Read more >
Parse JSON with jq and ignore lines with errors - nem.ec
Parse JSON with jq and ignore lines with errors. The -R causes jq to read each line without parsing it. Then the fromjson?...
Read more >
How to handle invalid JSON parse error properly.
The most common way to handle JSON parse error is using try-catch block. If the JSON string is valid, it will return a...
Read more >
CLI Reference — SQLFluff 1.4.5 documentation
Ignore particular families of errors so that they don't cause a failed run. For example –ignore parsing would mean that any parsing errors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found