Coder Social home page Coder Social logo

lint: support stylelint? about griffel HOT 2 OPEN

MLoughry avatar MLoughry commented on June 11, 2024
lint: support stylelint?

from griffel.

Comments (2)

layershifter avatar layershifter commented on June 11, 2024

I see that the @griffel/babel-preset depends on @linaria, which in turn has mechanisms to run stylelint over the resulting CSS. However, I cannot seem to get it working with Griffel.

Currently we use just a part of Linaria that performs module evaluation, in background we are trying to move to v4 (#414), but there are still blockers that prevent us from its adoption 😿

Fair note: we actively collaborate with Linaria maintainer to resolve them.

Is there already an undocumented way of doing this that could be documented? Or would it be possible to create a supported way to do this?

There is no way to do this currently, however @ling1726 works on enhanced ESLint rule/plugin that runs against compiled CSS. The benefit of this approach that we can emit errors on source code and don't require build for a feedback loop that makes DX significantly better 💪

I think that it would be great to embed stylelint to these changes. We don't have it in opensource yet, but I will connect you in offline.

from griffel.

ling1726 avatar ling1726 commented on June 11, 2024

Needs some investigation to see if we can implement a stylelint preprocessor for Griffel and get good source mapping support. It's essentially all that Linaria's stylelint package does https://github.com/callstack/linaria/blob/master/packages/stylelint/src/preprocessor.ts

The current work with eslint, does much of the same as a stylelint preprocessor would require - we'd just need to see if we need to do that work differently with stylelint

from griffel.

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.