@fylgja/stylelint-config

5.0.3 • Public • Published

Fylgja stylelint-config

NPM version GitHub Workflow Status License

A sharable stylelint config object that enforces Fylgja's CSS rules.

Installation

npm install @fylgja/stylelint-config --save-dev

Usage

If you've installed @fylgja/stylelint-config, just set your stylelint config to:

{
  "extends": "@fylgja/stylelint-config"
}

SCSS, Tailwind and Inline CSS support found under the Extra Syntax Support

Extending

Simply add a "rules" key to your config, then add your overrides and additions there.

{
  "extends": "@fylgja/stylelint-config",
  "rules": {
    "rule-empty-line-before": [
        "always-multi-line", {
            "except": ["first-nested"],
            "ignore": ["after-comment"]
        }
    ],
  }
}

Extra Syntax Support

The core rules take some preprocessors rules in account, if they do not impact any CSS defaults.

For better support pre-processors and post-processors support, use the following options below.

SCSS

This adds support for Sass (scss syntax) support.

To include these rules, add scss to the end of the extend path;

{
    "extends": "@fylgja/stylelint-config/scss",
}

For more infomation checkout the SCSS Doc on fylgja.dev.

TailwindCSS

This adds support for TailwindCSS functions in CSS.

To include these rules, add tailwind to the end of the extend path;

{
    "extends": "@fylgja/stylelint-config/tailwind",
}

CSS Order

There are no rules, since we do feel there should be a form flexibility on that part.

But we do follow a specific style of ordering for our CSS, it's is described in our CSS order DOC at fylgja.dev.

Inline CSS support (HTML and more)

Any of the Fylgja Stylelint Config options will, as of v5.0 also check any inline CSS by default.

This done thx to the Stylelint plugin stylelint-config-html.

This plugin will add support to check your project not just for errors in CSS files, but also checks in the style tags in your HTML.

You can opt out of this behavior by using the rules directly, found in the rules folder.

Rules

For information on what each rule does and what is set, see the Fylgja stylelint-config docs, on fylgja.dev

All rules are base on the stylelint-config-recommended. You should also checkout the rules set there.

Install

npm i @fylgja/stylelint-config

Homepage

fylgja.dev/

DownloadsWeekly Downloads

138

Version

5.0.3

License

MIT

Unpacked Size

13.6 kB

Total Files

10

Last publish

Collaborators

  • allrude
  • grimlink