-
-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
- Node Version: 8.3.0
- NPM Version: 5.3.0
- postcss-less Version: 1.1.0
LESS
@import missing "missing" "not missing";JavaScript
require("postcss-less").parse('@import missing "missing" "not missing";')Expected Behavior
Error thrown, or missing and "missing" being somewhere on the Import node.
Note: The example code is invalid Less ("malformed import statement").
Actual Behavior
The example Less code parses the same as this:
@import "not missing";In other words, missing and "missing" are totally ignored.
How can we reproduce the behavior?
require("postcss-less").parse('@import missing "missing" "not missing";')Background
This causes problems for Prettier when people forget the semicolon after the @import: prettier/prettier#2584
@import "../assets/font/league-gothic/league-gothic.css"
.ManagerPage {
height: 100%;
}... is turned into this by Prettier:
@import .ManagerPage {
height: 100%;
}... because "../assets/font/league-gothic/league-gothic.css" is entirely missing from the AST. Prettier would need:
- Either an error to be thrown
- or
"../assets/font/league-gothic/league-gothic.css"being somewhere on theImportnode so that it can be printed back.
vjeux
Metadata
Metadata
Assignees
Labels
No labels