bencergazda / stylelint-codeframe-formatter Goto Github PK
View Code? Open in Web Editor NEWStylelint formatter using babel code frame
Stylelint formatter using babel code frame
If a JS style comment (// a comment
) is present in a CSS file, a codeframe ins't printed.
Such comments may appear in CSS-in-JS codebases. Regardless of this specific use case, CSS is forward comatible and simply ignores syntax which it doesn't recognize. So should the formatter.
Fixed by #13.
Hello and thanks for this module!
I found out that if stylelint fails to parse the linted file, the error isn't displayed. Here's the default formatter:
backoffice/src/App.tsx
✖ Cannot find module 'babel-preset-react-app' Require stack: - MODULE_NOT_FOUND
/some/path/backoffice/node_modules/@babel/core/lib/config/files/plugins.js -
/some/path/backoffice/node_modules/@babel/core/lib/config/files/index.js -
/some/path/backoffice/node_modules/@babel/core/lib/index.js -
/some/path/backoffice/node_modules/linaria/lib/transform.js -
/some/path/backoffice/node_modules/linaria/lib/stylelint/preprocessor.js -
/some/path/node_modules/stylelint/lib/augmentConfig.js -
/some/path/node_modules/stylelint/lib/createStylelint.js -
/some/path/node_modules/stylelint/lib/printConfig.js -
/some/path/node_modules/stylelint/lib/cli.js -
/some/path/node_modules/stylelint/bin/stylelint.js
Here's the same with this formatter:
backoffice/src/index.tsx
✖ (MODULE_NOT_FOUND)
1 | <Entire file contents here>
I've opened a PR to fix it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.