Socket
Book a DemoInstallSign in
Socket

@frsource/vite-plugin-stylelint

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frsource/vite-plugin-stylelint

Stylelint plugin for vite.

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
90
-29.69%
Maintainers
2
Weekly downloads
 
Created
Source

@frsource/vite-plugin-stylelint

Important

This plugin has been deprecated in favor of vite-plugin-checker. Please refer to its' documentation to learn how to setup the stylelint check.

npm GitHub license

Stylelint plugin for vite. Supports autofixing & lints only the files imported in your project. See the example directory to check Vue / React usage.

Install

npm install @frsource/vite-plugin-stylelint --save-dev
# or
yarn add @frsource/vite-plugin-stylelint --dev

Usage

import { defineConfig } from 'vite';
import stylelintPlugin from '@frsource/vite-plugin-stylelint';

export default defineConfig({
  plugins: [stylelintPlugin({ /** Options */ })],
});

Options

Apart from the standard Stylelint options this plugin can be configured using the ones below:

fix

  • Type: boolean
  • Default: false

Auto fix the source code.

include

  • Type: string | string[]
  • Default: ['src/**/*.css', 'src/**/*.less', 'src/**/*.styl', 'src/**/*.scss', 'src/**/*.sass', 'src/**/*.vue']

A single file, or array of files, to include when linting.

exclude

  • Type: string | string[]
  • Default: 'node_modules'

A single file, or array of files, to exclude when linting.

formatter

  • Type: string | Stylelint.FormatterType
  • Default: 'string'

Custom error formatter or the name of a built-in Styleling formatter, defaults to 'string'.

throwOnWarning

  • Type: boolean
  • Default: true

Should the warnings found be emitted, defaults to true.

throwOnError

  • Type: boolean
  • Default: true

Whether errors found should be emitted to console & stop the build, defaults to true.

cache

  • Type: boolean
  • Default: true

Decrease execution time by enabling Stylelint cache. Defaults to true.

cacheLocation

  • Type: string
  • Default: '<cwd>/node_modules/.vite/@frsource-vite_plugin-stylelint'

Path for the cache, defaults to '<cwd>/node_modules/.vite/@frsource-vite_plugin-stylelint'.

Development

This project is using yarn version 3. Make sure to use yarn set version latest to download it before doing any changes.

License

MIT

Keywords

stylelint

FAQs

Package last updated on 29 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.