Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stylelint-config-spaceninja

spaceninja475MIT15.0.0

Spaceninja's stylelint config

stylelint, stylelint-config, spaceninja

readme

stylelint-config-spaceninja

NPM version Build Status Renovate

A sharable stylelint config object that enforces Space Ninja's CSS Standards

Installation

Install stylelint and stylelint-config-spaceninja:

npm install stylelint stylelint-config-spaceninja --save-dev

Usage

If you've installed stylelint-config-spaceninja locally within your project, just set your stylelint config to:

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

You'll probably also want to add a script to your package.json file to make it easier to run Stylelint with this config:

"scripts": {
  "lint:css": "stylelint '**/*.css'"
}

Using with Prettier

It's common to pair Stylelint with Prettier. If you're going to use both, you'll want to add stylelint-config-prettier, which is a config that disables any Stylelint rules that conflict with Prettier.

npm install stylelint-config-prettier --save-dev

Then add it to your Stylelint config. It'll need to be the last item in the extends array so it can override other configs.

{
  extends: ["stylelint-config-spaceninja", "stylelint-config-prettier"],
}

Then you can update your package.json script to run Prettier as well as Stylelint:

"scripts": {
  "lint:css": "prettier --list-different '**/*.css' && stylelint '**/*.css'"
}

Extending the config

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

For example, to change the at-rule-no-unknown rule to use its ignoreAtRules option, change the indentation to tabs, turn off the number-leading-zero rule,and add the unit-whitelist rule:

{
  "extends": "stylelint-config-spaceninja",
  "rules": {
    "at-rule-no-unknown": [ true, {
      "ignoreAtRules": [
        "extends",
        "ignores"
      ]
    }],
    "indentation": "tab",
    "number-leading-zero": null,
    "unit-whitelist": ["em", "rem", "s"]
  }
}

Documentation

Extends

Plugins

Configured Lints

This is a list of the lints turned on in this configuration (beyond the ones that come from stylelint-config-standard-scss), and what they do.

Declaration

Changelog

License

changelog

15.0.0 - 2024-01-04

  • Removed stylelint-a11y This plugin is no longer maintained, and I found I was disabling one of the three rules it added most of the time. @see https://github.com/YozhikM/stylelint-a11y/issues/65
  • Updated stylelint-config-standard-scss to v13
  • Updated stylelint peer dependency to v16

14.0.0 - 2023-09-19

  • Updated stylelint-config-standard-scss to v11

13.0.1 - 2023-07-24

  • Updated stylelint peer dependency to ^15.5.0

13.0.0 - 2023-07-24

  • Updated stylelint peer dependency to v15
  • Updated stylelint-config-standard-scss to v10
  • Updated stylelint-order to v6

12.0.0 - 2022-12-13

  • Major version bump due to dependencies
  • Updated stylelint-config-standard-scss to v6

11.0.0. - 2022-07-25

  • Updated stylelint-config-standard-scss to v5
  • Removed: stylelint less than 14.9.0 from peer dependencies.

10.0.0 - 2022-02-28

  • Updated stylelint-config-standard-scss to v3

9.0.1 - 2021-10-26

  • Unintentionally listed some dependencies as devdependencies

9.0.0 - 2021-10-26

  • Major version bump due to new rules
  • Removed many rules already declared in shared configs
  • Added stylelint-a11y
  • Added stylelint-high-performance-animation

8.0.0 - 2021-10-22

  • Major version bump due to dependencies
  • Updated stylelint to v14.0.0
  • Replace stylelint-config-standard and stylelint-scss with stylelint-config-standard-scss
  • Updated stylelint-order to v5.0.0
  • Updated stylelint-declaration-block-no-ignored-properties to v2.4.0

7.0.0 - 2020-02-11

  • Major version bump due to dependencies
  • Updated stylelint-config-standard to v20
  • Updated stylelint to v13.1.0

6.0.0 - 2020-02-07

  • Major version bump due to dependencies
  • Updated stylelint to v13
  • Updated stylelint-order to v4
  • Updated eslint to v6.8.0
  • Updated jest to v25

5.0.0 - 2019-11-19

  • Major version bump due to Stylelint v12

4.0.0 - 2018-11-07

  • Removed indentation in favor of stylelint-config-standard's setting

3.0.0 - 2018-10-18

2.4.0 - 2018-04-25

2.3.0 - 2018-02-23

2.2.0 - 2017-11-29

  • Removed: except: ["first-nested"] option from scss/double-slash-comment-empty-line-before rule, because it's not what we actually wanted.

2.1.0 - 2017-11-28

  • Removed: no-descending-specificity rule, due to false positives, pending #2489

2.0.0 - 2017-11-28

1.1.0 - 2017-11-17

  • Changed at-mixin-argumentless-call-parentheses to "always"

1.0.0 - 2017-10-20

  • Initial release