GithubHelp home page GithubHelp logo

stylelint-suitcss's Introduction

stylelint-suitcss

NPM version Build Status

A collection of stylelint plugins for SUIT CSS.

Installation

npm install stylelint-suitcss --save-dev

# or

yarn add stylelint-suitcss --dev

Usage

Add stylelint-suitcss to your stylelint config plugins array, then add rules you need to the rules object.

// .stylelintrc
{
  "plugins": [
    "stylelint-suitcss"
  ],
  "rules": {
    "suitcss/custom-property-no-outside-root": true,
    "suitcss/root-no-standard-properties": true,
    "suitcss/selector-root-no-composition": true
  }
}

Available rules

stylelint-suitcss's People

Contributors

alecrust avatar bjentsch avatar satazor avatar simonsmith avatar vidhem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

stylelint-suitcss's Issues

Disable `no-descending-specificity`

This rule is usually but not always right. Case in point, it gets confused in SCSS contexts:

254:3 ✖ Expected selector .wp-block-pullquote p to come before selector .wp-block-quote.is-large p no-descending-specificity
254:3 ✖ Expected selector .wp-block-pullquote p to come before selector .wp-block-quote.is-style-large p no-descending-specificity
274:3 ✖ Expected selector .wp-block-quote.is-style-large p to come before selector .wp-block-pullquote.is-style-solid-color blockquote p no-descending-specificity
274:3 ✖ Expected selector .wp-block-quote.is-large p to come before selector .wp-block-pullquote.is-style-solid-color blockquote p no-descending-specificity

Question about disabling custom-property-no-outside-root

What is the risk in disabling this? I have some cases where I would like to override the value of a custom property inside a selector. Say:

:root {
  --color: blue;
}

.foo {
  --color: red;
}

I get the stylelint warning without disabling the rule, and I thought i would see what the issue with it is?

Update stylelint to v8

stylelint-config-suitcss is using stylelint v8 in its dependencies but also uses stylelint-suitcss having stylelint v7.

An upgrade is required to v8 to fetch stylelint only at one place (in the global node_modules).

In a complex JS system, having both v7 and v8 is causing troubles for me.

See PR #2

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.