All Projects → zabute → stylelint-processor-glamorous

zabute / stylelint-processor-glamorous

Licence: MIT License
💄 Lint glamorous and related css-in-js with stylelint

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to stylelint-processor-glamorous

Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (+1344.44%)
Mutual labels:  stylelint, linter, css-in-js
Gulp Stylelint
Gulp plugin for running Stylelint results through various reporters.
Stars: ✭ 149 (+727.78%)
Mutual labels:  stylelint, linter
Lint Staged
🚫💩 — Run linters on git staged files
Stars: ✭ 9,492 (+52633.33%)
Mutual labels:  stylelint, linter
Husky.Net
Git hooks made easy with Husky.Net internal task runner! 🐶 It brings the dev-dependency concept to the .NET world!
Stars: ✭ 394 (+2088.89%)
Mutual labels:  stylelint, linter
elint
A easy way to lint your code
Stars: ✭ 38 (+111.11%)
Mutual labels:  stylelint, linter
Stylelint Processor Styled Components
Lint your styled components with stylelint!
Stars: ✭ 639 (+3450%)
Mutual labels:  stylelint, linter
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (+2016.67%)
Mutual labels:  stylelint, linter
react-native-css-in-js-benchmarks
CSS in JS Benchmarks for React Native
Stars: ✭ 46 (+155.56%)
Mutual labels:  css-in-js, glamorous
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-22.22%)
Mutual labels:  stylelint, linter
EditorConfig-Action
🔎A GitHub Action to check, enforce & fix EditorConfig style violations
Stars: ✭ 40 (+122.22%)
Mutual labels:  stylelint, linter
sonar-css-plugin
SonarQube CSS / SCSS / Less Analyzer
Stars: ✭ 46 (+155.56%)
Mutual labels:  stylelint, linter
Stylelint
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.
Stars: ✭ 9,350 (+51844.44%)
Mutual labels:  linter, css-in-js
stylelint-config-styled-components
The shareable stylelint config for stylelint-processor-styled-components
Stars: ✭ 66 (+266.67%)
Mutual labels:  stylelint, stylelint-processor
Flake8
The official GitHub mirror of https://gitlab.com/pycqa/flake8
Stars: ✭ 1,112 (+6077.78%)
Mutual labels:  stylelint, linter
Glamorous
DEPRECATED: 💄 Maintainable CSS with React
Stars: ✭ 3,681 (+20350%)
Mutual labels:  css-in-js, glamorous
spec
🐣 easy to use eslint/stylelint/tslint/prettier/...
Stars: ✭ 60 (+233.33%)
Mutual labels:  stylelint, linter
vscode-linter
Extension for code linting, all in one package. New linters can be easily added through an extension framework.
Stars: ✭ 47 (+161.11%)
Mutual labels:  stylelint, linter
elodin-old
Quality and Optimisation tools for CSS in JavaScript
Stars: ✭ 15 (-16.67%)
Mutual labels:  linter, css-in-js
vscode-stylelint-plus
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint, support auto fix on save.
Stars: ✭ 32 (+77.78%)
Mutual labels:  stylelint, linter
pahout
A pair programming partner for writing better PHP. Pahout means PHP mahout 🐘
Stars: ✭ 43 (+138.89%)
Mutual labels:  linter

stylelint-processor-glamorous

Lint glamorous and related css-in-js with stylelint

Build Status

Installation

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

You can use styleiint-config-recomended or your own custom config. Certain rules that enforce formatting rules will be 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

      import glamorous from 'glamorous'; // choose any name for the defaut export
    
      const Component = glamorous.div({ ... });
      const OtherComponent = 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.


Integrating with other css-in-js libraries

You can use @css to lint any object. Hoverver, if you stick to the styled pattern, you won't need to add annotations to your code.

  import styled from 'my-fav-cssinjs-lib';

  const Component = styled.div({ ... })
  const OtherComponent = styled('div')({ ... })  

Contributing

Contributions of any kind are always welcome.


LICENSE: MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].