README
vite-plugin-stylelint
Stylelint plugin for vite.
Install
npm install vite-plugin-stylelint --save-dev
# or
yarn add vite-plugin-stylelint --dev
Usage
import { defineConfig } from 'vite';
import StylelintPlugin from 'vite-plugin-stylelint';
export default defineConfig({
plugins: [StylelintPlugin()],
});
Options
cache
- Type:
boolean - Default:
true
Decrease execution time.
fix
- Type:
boolean - Default:
false
Auto fix source code.
include
- Type:
string | string[] | RegExp - Default:
/.*\.(vue|css|scss|sass|less|styl)$/
A single file, or array of files, to include when linting.
exclude
- Type:
string | string[] | RegExp - Default:
/node_modules/
A single file, or array of files, to exclude when linting.
formatter
- Type:
Formatter | FormatterType - Default:
'string'
Custom error formatter or the name of a built-in formatter.
throwOnWarning
- Type:
boolean - Default:
true
The warnings found will be emitted, default to true.
throwOnError
- Type:
boolean - Default:
true
The errors found will be emitted, default to true.
License
MIT