Code Monkey home page Code Monkey logo

Comments (7)

ismay avatar ismay commented on May 20, 2024

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.

emilgoldsmith avatar emilgoldsmith commented on May 20, 2024

I meant like eslint-loader so that it'll show up in webpack-dev-server when using hot-reload.

from stylelint-processor-styled-components.

ismay avatar ismay commented on May 20, 2024

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.

emilgoldsmith avatar emilgoldsmith commented on May 20, 2024

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.

ismay avatar ismay commented on May 20, 2024

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.

emilgoldsmith avatar emilgoldsmith commented on May 20, 2024

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.

emilgoldsmith avatar emilgoldsmith commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.