Skip to content

Remove default error from feature detect#75

Merged
1 commit merged intomasterfrom
remove-default-error
Oct 9, 2017
Merged

Remove default error from feature detect#75
1 commit merged intomasterfrom
remove-default-error

Conversation

@ghost
Copy link

@ghost ghost commented Sep 22, 2017

Currently doiuse will throw an error for unrecognised node types. Users using LESS with import statements are running into problems with this because the less parser introduced a new node type for import statements:

I believe the Less parser introduced a new node type (import) to the AST and it is entitled to do so. All PostCSS plugins should probably ignore node types they don't recognise, rather than throwing an error, as this allows for additional node types to be added to the AST by either the PostCSS standard CSS parser or by any of other PostCSS parsers (postcss-less, postcss-scss, sugarss etc).

By ignoring unrecognised node types doiuse will only warn about known syntax, and we can leave the check for syntax validity to other tools.

See discussion in RJWadley/stylelint-no-unsupported-browser-features#36 and stylelint/stylelint#2904.

As users might depend on their build breaking because of this I'm intending to publish this as a breaking change (i.e. new major version).

@ghost ghost force-pushed the remove-default-error branch from 0905798 to 7383ca5 Compare September 22, 2017 09:54
@ghost ghost requested a review from ai September 22, 2017 10:00
@ghost ghost requested a review from anandthakker October 5, 2017 07:21
@ghost
Copy link
Author

ghost commented Oct 5, 2017

@ai, @anandthakker Requested a review, just to make sure noone disagrees with the decision to handle the problem in doiuse. I know you're both busy, so I'm not expecting any replies, but I just wanted to keep you both informed and give you the opportunity to object if you disagree.

If there aren't any objections I'll try to merge and release a new version this week.

@ghost ghost merged commit 09db5fc into master Oct 9, 2017
@ghost ghost deleted the remove-default-error branch October 9, 2017 12:27
@pkuczynski pkuczynski added this to the Before 4.1.0 milestone Sep 27, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant