@wagtail/stylelint-config-wagtail

Shareable stylelint config for CSS and SCSS, following Wagtail’s code style

Usage no npm install needed!

<script type="module">
  import wagtailStylelintConfigWagtail from 'https://cdn.skypack.dev/@wagtail/stylelint-config-wagtail';
</script>

README

@wagtail/stylelint-config-wagtail Stylelint

@wagtail/stylelint-config-wagtail on npm

Shareable stylelint config for CSS and SCSS, following Wagtail’s code style.

Usage

Our default export contains all of our Stylelint rules, along with specific plugins for SCSS syntax.

  1. Run npm install stylelint @wagtail/stylelint-config-wagtail --save-dev
  2. Add "extends": "@wagtail/stylelint-config-wagtail" to your .stylelintrc

Links

Contribution Guidelines

Install

  • Required Node
  • We recommend using nvm
  • Clone the project on to your computer
  • Run nvm install to ensure you have the correct Node version
  • Run npm install to install project dependencies
  • Ensure your editor is set up to use editorconfig, Prettier, Eslint and Stylelint

Development

  • Run nvm use to set Node to the correct version
  • Run tests via npm run test
  • Run linting via npm run lint
  • Run preflight checks before commiting final code via npm run preflight
  • Note: When working with the rule set, only modify the index.js file, not the .eslintrc file as it is for local linting only