Comments (7)
Depends, what kind of integration are you looking for? You wont have to compile anything and linting can just be done from the commandline with stylelint.
from stylelint-processor-styled-components.
I meant like eslint-loader
so that it'll show up in webpack-dev-server when using hot-reload.
from stylelint-processor-styled-components.
I think this should do what you're looking for: https://www.npmjs.com/package/stylelint-webpack-plugin
It accepts a regular stylelint config, so you should be able to define the processor there. I'll close this as I think this should solve it, but please let me know if this doesn't work as expected.
from stylelint-processor-styled-components.
Yeah @ismay I looked at that one already and I feel like it's a quite unnatural implementation (of top of it not working at all for styled components as it looks for .css (or scss and the other extensions) files, not js). It's a plugin not a loader which means it kinda does something very separate from Webpack. I guess one could write a plugin that simply just runs something similar to the yarn lint:css
that you can easily write, but what I'd love is something like [eslint-loader](That might be possible in some cases, but ultimately I think it would be quite difficult. Some values would only be available at runtime if I'm not mistaken and there would probably be quite a performance hit.) that would just pretty much apply this package to any .js(x) file it sees, and I guess there's nothing like that out there at the moment.
So yeah, I may write a small package, it seems to be quite light weight.
from stylelint-processor-styled-components.
Yeah @ismay I looked at that one already and I feel like it's a quite unnatural implementation (of top of it not working at all for styled components as it looks for .css (or scss and the other extensions) files, not js).
Ah ok, I didn't take a thorough look, but yeah that's not helpful then.
So yeah, I may write a small package, it seems to be quite light weight.
Cool! Would be nice! Probably worth adding it to the docs here if you're publishing it.
from stylelint-processor-styled-components.
Cool! Would be nice! Probably worth adding it to the docs here if you're publishing it.
That was also the plan! :).
As I was doing a bit of extra research for it I actually found a deprecated package that works exactly how I want it to though. I had first not tried it as it was deprecated a year ago and had just followed the links it gives, but now I've tried the two links it gives and both don't work for our purposes as they both assume (and therefore break without it) css files! While the deprecated package actually uses the stylelint processor given to it (as we want it to). But yeah I tried installing the deprecated package and it actually works just the way I want it haha. I'll see if I either just fork that package and become the new maintainer or I build a new one from scratch as it's not that big a deal, because I of course don't want a deprecated package as a dependency.
from stylelint-processor-styled-components.
Though I also don't really like the way the deprecated package outputs errors and stuff.
But yeah I'll definitely look at it :)
from stylelint-processor-styled-components.
Related Issues (20)
- Autofix stylelint doesn't work HOT 3
- Release a new version with stylelint 10 changes HOT 2
- Using other styled components in selectors not working HOT 8
- Add support for css prop HOT 4
- Remove or rename invalid `-styled-mixin0` CSS properties caused by using mixins HOT 5
- Variables start with $ don't throw errors HOT 2
- Upgrade outdated "@babel/parser" dependency HOT 3
- Add Support for Object Syntax HOT 3
- Deprecated package HOT 10
- CSS partials cause `CssSyntaxError` HOT 1
- An in-range update of postcss is breaking the build 🚨 HOT 2
- Possible to lint styles outside styled component definition? HOT 4
- Nested `css` blocks inside of styled-components creates invalid code HOT 1
- Support babel 7.8 syntax like null coalescing without plugins HOT 2
- Stylelint doesn't lint nested conditional block of styles
- Stylelint: Unknown word (CssSyntaxError) when commenting out valid css HOT 2
- Do I need this? HOT 2
- style lint don't work HOT 1
- Template literal types cannot have any substitution HOT 1
- Vulnerability Issue HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylelint-processor-styled-components.