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.

The warning about not setting a parser or plugins has false positives when using the syntax option

See original GitHub issue

When setting the syntax through the syntax option instead of setting the parser option, the warning about doing nothing is displayed by postcss. But I have a custom parser thanks to the syntax I set.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Jun 10, 2021

@stof wait a second. Why do you need to use PostCSS without plugins and with the same syntax for parser and stringifier?

postcss([]).process(source, { syntax: scss })

In this case, input will be equal to output.

0reactions
stofcommented, Jun 10, 2021

@ai I have a case where I generate some scss based on some other scss. As part of this, I inline all imported files into my main AST (before running other plugins removing lots of things from the AST). So here, I parse the input to get the AST and insert it to replace the @import node in the other tree. I don’t stringify it directly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix CSS-in-JS problems · Issue #4574 · stylelint/ ...
We have a bunch of CSS-in-JS related problems. ... #4706 — Fix false positives when importing from module with css in name
Read more >
Command Line Interface
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Suppression of false positive warnings
This section describes analyzer′s false positives suppression features. It provides ways to control both the separate analyzer messages ...
Read more >
ESLint - Configuring "no-unused-vars" for TypeScript
Prior to the change on my side, I had multiple false errors when using interfaces/types saying that these vars were unused (which of...
Read more >
postcss@8.3.5
Fixed false positives PostCSS does nothing warning on syntax option. ... 8.2.13. Fixed ReDoS vulnerabilities in source map parsing (by Yeting Li).
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