stylelint-processor-glamorous

0.3.0 • Public • Published

stylelint-processor-glamorous

Lint glamorous and related css-in-js with stylelint

Build Status

Installation

$ yarn add stylelint stylelint-processor-glamorous stylelint-config-standard --dev

You don't have to use the standard config. You can use styleilint-config-recommended or use your own cusotm config. Certain rules that enforce formatting are ignored.

Add .stylelintrc to the root of your project.

{
  "processors": ["stylelint-processor-glamorous"],
  "extends": "stylelint-config-standard"
}

That's it. You can now run stylelint from the command line.

$ yarn stylelint 'src/**/*.js'

What gets linted

  • Glamorous component factories

      const Component = glamorous.div({ ... });
  • CSS attributes

      <Div css={{ ... }}/>
  • Annotated object literals.

    export const styles = 
      // @css
      {
        ...
      }

    The @css comment tells the processor that its a style object. Make sure you put it right before the opening brace.


LICENSE: MIT

Package Sidebar

Install

npm i stylelint-processor-glamorous

Weekly Downloads

86

Version

0.3.0

License

MIT

Unpacked Size

206 kB

Total Files

13

Last publish

Collaborators

  • zabute