-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial release checklist #1
Comments
Location info correctionWe have a location info correction walker here. Its purpose is to correct a PostCSS location by offsetting it with the original JS location it came from. For example, if our This is already implemented (though untested). However, we will have incorrect locations when expressions are used: css`
.foo { color: ${'blue'}; }
`; Will become: .foo { color: /* PLACEHOLDER */ } Which means the end position of this stylesheet will be off by This only matters for end positions, I think. We need to think of some way to correct the line and column based on any expressions that were in there originally (expressions can be multi-line). |
I'm afraid I don't know much about writing syntaxes. My only suggestion is calling this |
no worries, i'll figure it out. i've gone ahead and renamed the package too. finally got the location resolution working, too 🙌 |
for anyone lurking: all of this is done now. once postcss/postcss#1675 is merged, i can merge the remaining PRs and publish. some similar postcss syntaxes do exist, but i figure its nice to have a lit-specific one anyway we can keep more focused and maintained. it works as a postcss syntax and a stylelint syntax just fine |
everything is merged, will publish tonight. closing this now 👍 |
This is an attempt at implementing a custom syntax for PostCSS, primarily so we can use stylelint against lit projects.
Before it is usable, here's what is to do:
@babel/parser
with and if we can infer from the consumer's babelrc fileAny help with this will be appreciated, the location info will be the pain point i think. i've been down that road before with lit's eslint plugin, fun but insane...
I left a console.log in the main file right now to test parsing a string, too. FYI
cc
@jeddy3 - since your reply in the other issue today, this is where i got to. still a way to go but maybe you can let me know if its the right direction
@bennypowers @abdonrd you may be interested too
@stramel if you're curious 😂
The text was updated successfully, but these errors were encountered: