0.4.0 • Published 4 years ago

gridsome-plugin-stylelint v0.4.0

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

gridsome-plugin-stylelint

Stylelint plugin for Gridsome

Requirements

You need to ensure that you have stylelint installed:

# npm
npm install --save-dev stylelint

# yarn
yarn add --dev stylelint

Setup

  1. Add gridsome-plugin-stylellint dependency to your project.
# npm
npm install --save-dev gridsome-plugin-stylellint

# yarn
yarn add --dev gridsome-plugin-stylellint
  1. Add gridsome-plugin-stylellint to the plugins section of gridsome.config.js
module.exports = {
  plugins: [
    {
      use: "gridsome-plugin-stylelint",
      options: {
        // All stylelint-webpack-plugin options
      },
    },
  ],
};

Options

gridsome-plugin-stylelint is a wrapper around stylelint-webpack-plugin. All of the options & their defaults are directly mapped on and from stylelint-webpack-plugin, with the exception op the following:

context

  • Type: String
  • Default: /src

files

  • Type: String|Array[String]
  • Default: "**/*.{s?(a|c)ss,less,stylus,vue}"