Vite 2 plugin for stylelint that works with the dev server.
By default displays warnings and errors to the terminal`s console.
npm install @amatlash/vite-plugin-stylelint --save-dev
import { defineConfig } from 'vite';
import viteStylelint from '@amatlash/vite-plugin-stylelint';
export default defineConfig({
plugins: [viteStylelint()],
});
Plugin can operate only with default .stylelintrc
files.
npm install stylelint-config-standard --save-dev
// .stylelintrc.js
module.exports = {
extends: "stylelint-config-standard"
}
For advanced config linting options check out the official stylelint docs.
MIT