1.1.3 • Published 1 year ago

kifor-stylelint-config v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

kifor-stylelint-config

npm version Build Status Downloads per month

Created by Kifor Kostiantyn

This is the standard configuration file for stylelint from Kifor Kostiantyn.

Use it as is or as a basis for your own configuration.

Installation

Along with the config, install the stylelint itself.

npm i -D kifor-stylelint-config stylelint

Usage

In the root of the project, create a .stylelintrc file and in it add kifor-stylelint-config to the extends field.

.stylelintrc

{
  "extends": "kifor-stylelint-config"
}

If you set kifor-stylelint-config globally with the -g flag, then you need to use the absolute path kifor-stylelint-config in the configuration file:

.stylelintrc

{
  "extends": "/absolute/path/to/kifor-stylelint-config"
}

Configure extension

You can override existing rules or add new ones.

To do this, add a rules field to the config with the desired rule overrides.

.stylelintrc

{
  "extends": "kifor-stylelint-config",
  "rules": {
    "property-no-unknown": [
      true,
      {
        "ignoreProperties": [
          "composes"
        ]
      }
    ],
    "unit-whitelist": ["em", "rem", "s", "px"]
  }
}

In the same rules field, you can also override the no longer supported Stylelint styleguide rules from the stylelint-codeguide plugin by adding the prefix codeguide/ before the rule name.

.stylelintrc

{
  "extends": "kifor-stylelint-config",
  "rules": {
    "property-no-unknown": [
      true,
      {
        "ignoreProperties": [
          "composes"
        ]
      }
    ],
    "unit-whitelist": ["em", "rem", "s", "px"],

    "codeguide/indentation": "tab",
    "codeguide/number-leading-zero": null
  }
}

Usage in VSCode

  1. Install stylelint and config
  2. Open VSCode
  3. Install the stylelint plugin
  4. Use it

Inconsistencies with the config rules are underlined with a red wavy line, hovering over it will bring up a popup with the error description.

1.1.3

1 year ago

1.1.1

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.5.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.4.0

2 years ago

0.1.0

2 years ago

0.0.25

2 years ago

0.0.12

2 years ago

0.0.15

2 years ago

0.0.11

2 years ago

0.0.1

2 years ago