Socket
Book a DemoInstallSign in
Socket

@icelandair/stylelint-config

Package Overview
Dependencies
Maintainers
18
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icelandair/stylelint-config

Icelandair's stylelint config

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
18
Created
Source

@icelandair/stylelint-config

npm

This package provides Icelandair's stylelint as an extensible shared config extending stylelint-config-recommended.

Additionally it provides an optional csscomb config for automatic css/scss formatting.

Installation

Assuming you already have a valid package.json:

yarn add -D @icelandair/stylelint-config stylelint

or

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

Usage

@icelandair/stylelint-config

If you are writing a React application or component your .stylelintrc will look like this:

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

Is is possible to disable or activate additional rules.

Example:

{
  "extends": "@icelandair/stylelint-config",
  "rules": {
    "max-nesting-depth": 4,
  }
}

Full list of rules can be found in stylelints user guide.

To exlude files or folders, create a .stylelintignore file next to the stylelintrc. Documentation in the stylelint user guide

Install stylelint extension to atom, vsCode, sublime to get warnings when editing files.

Add a script in your package.json, example:

"lint:styles": "stylelint 'src/**/*.scss' --fix"

@icelandair/stylelint-config/csscomb.json

To utilise the csscomb config for automatic code formatting you will need to add a .csscomb file to the root of your project.

{
  "extends": "node_modules/@icelandair/stylelint-config/csscomb.json"
}

Additionally you need to install the csscomb plugin to your editor and activate the format on save option.

Atom vsCode Sublime

Keywords

csscomb

FAQs

Package last updated on 05 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts