anandthakker / doiuse

:bomb: Lint CSS for browser support against caniuse database.
MIT License
1.24k stars 51 forks source link

Support source maps #42

Closed eekboom closed 1 year ago

eekboom commented 8 years ago

We use stylus to compile to a single css file. Unfortunately that means we currently get all doiuse warnings without reference to the actual source. (Everything displays like :1:2037: Some warning)

The browser is able to show the correct Stylus line numbers and file names.

The CSS file contains the sourcemap starting with

/*# sourceMappingURL=data:application/json;base64,

SevereOverfl0w commented 8 years ago

https://github.com/postcss/postcss/blob/master/docs/api.md#inputoriginline-column their is an api available to us for getting the original line.

https://github.com/anandthakker/doiuse/blob/master/src/doiuse.js#L51 will need modifying.

Would you be able to PR some changes?

clshortfuse commented 1 year ago

I would suggest pairing with stylelint via stylelint-no-unsupported-browser-features instead instead of the project building its own source maps.

That says there already is some source code in the project, so a better example of the issue might be needed.