stylelint-config-shopify
Shopify's stylelint rules and config
Last updated 5 months ago by shopify-dep .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install stylelint-config-shopify 
SYNC missed versions from official npm registry.

stylelint-config-shopify

Circle CI David-DM

Shopify's stylelint rules and config

Installation

Install stylelint and stylelint-config-shopify:

With Yarn

yarn add --dev stylelint stylelint-config-shopify

With npm

npm install stylelint stylelint-config-shopify --save-dev

Usage

Shopify’s stylelint rules come bundled in stylelint-config-shopify. To enable these rules, add a stylelint property in your package.json. See the stylelint configuration docs for more details.

"stylelint": {
  "extends": ["stylelint-config-shopify"]
}

Now you can run stylelint by adding the following linting script to your package.json. See the stylelint CLI docs for more details.

"scripts": {
  "stylelint": "stylelint 'src/**/*.scss'"
}

Run it:

With Yarn

yarn run stylelint

With npm

npm run stylelint

Prettier

This config also includes a prettier config which can be extended to format .scss. Using the stylelint-prettier plugin, prettier changes are exposed as stylelint rule violations.

Install prettier:

$ yarn add --dev prettier

Extend the config in your package.json:

"stylelint": {
  "extends": [
    "stylelint-config-shopify/prettier"
  ]
}

Add a prettier config in package.json:

"prettier": {
  "singleQuote": true,
  "trailingComma": "es5",
  "bracketSpacing": false
}

Prettier fixes shall be reported when you run stylelint **/*.css and shall be autofixed when you run stylelint --fix **/*.scss.

Current Tags

  • 7.2.1                                ...           latest (5 months ago)
  • 4.0.0-alpha.1                                ...           next (2 years ago)

29 Versions

  • 7.2.1                                ...           5 months ago
  • 7.2.0                                ...           5 months ago
  • 7.1.0                                ...           7 months ago
  • 7.0.4                                ...           a year ago
  • 7.0.3                                ...           a year ago
  • 7.0.0-alpa.1                                ...           a year ago
  • 7.0.2                                ...           a year ago
  • 7.0.1                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 6.1.0                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 5.1.2                                ...           a year ago
  • 5.1.1                                ...           a year ago
  • 5.1.0                                ...           a year ago
  • 5.0.1                                ...           a year ago
  • 5.0.0                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 4.0.0-alpha.1                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0-beta.5                                ...           2 years ago
  • 3.0.0-beta.4                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 3.0.0-beta.3                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.1                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |