Make sure we don't explode on Vue and css-in-js solutions #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stylelint 9.10.0 uses postcss-jsx to parse css-in-js solutions and postcss-html to parse vue/markdown/html files. These two together mean the embedded languages landscape is a lot cleaner than a few months ago in the days of 9.2.1.
However stylelint 9.9 to 9.10 changed how these embedded languages were passed into rules. In 9.9 the whole file content was available in
root.source.input
(i.e. a whole html or vue file, including all surrounding html tags tags). In 9.10 only the contents of style language fragments are available (i.e. only the content of each of the<style>
tags gets passed to the rule).This means that we can run stylelint with stylelint-prettier over these embedded language files, but it'll only prettify the style portions. If you're this interested in prettier then you probably want to run prettier over the rest of the file too to get it fully formatted. Thus it seems pointless to duplicate that work of running prettier within stylelint.
So stop running prettier over this handful of languages that can have style languages embedded into them.
This also adds a handful of e2e tests as which allow us to keep testing the embedded language end-to-end.
Fixes #18, #15 and #12.