vue-cli-plugin-stylelint-plugin
stylelint plugin for vue-cli
Last updated 2 years ago by xiaomingplus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vue-cli-plugin-stylelint-plugin 
SYNC missed versions from official npm registry.

@tencent/vue-cli-plugin-stylelint

stylelint plugin for vue-cli

fork from https://github.com/ascendancyy/vue-cli-plugin-stylelint

Injected commands

  • vue-cli-service lint:style

    Usage: vue-cli-service lint:style [options] [...files]
    
    Options:
    
      --no-fix           do not auto-fix errors
      --options          list additional stylelint cli options
    

    Lints and fixes files. If no specific files are given, it lints all vue files, html files, and stylesheets in src.

Configuration (vue.config.js, "vue" in package.json)

Lint on (re)build with stylelint-webpack-plugin can be enabled with the lintStyleOnBuild option. You can also provide additional options to stylelint. See available options on the stylelint website.

module.exports = {
  // ...
  pluginOptions: {
    lintStyleOnBuild: 'error', // default error,prevent compile  
    stylelint: {
      fix: true, // boolean (default: true)
      files: '', // string | [string] (default: ['src/**/*.{vue,htm,html,css,sss,less,scss}'])
      // See https://stylelint.io/developer-guide/formatters/
      formatter: () => {} // function (default: require('stylelint-codeframe-formatter'))
      // etc...
    }
  }
}

Installing in an already created project

npm install -D @tencent/vue-cli-plugin-stylelint
vue invoke @tencent/vue-cli-plugin-stylelint

There is also a shorthand to invoke the plugin
vue invoke @tencent/stylelint

webpack-chain Injections

  • config.plugin('stylelint')
  • config.plugin('stylelint').use('stylelint-webpack-plugin')
  • config.plugin('friendly-errors').tap(/* Adds additional transformer and formatter */)

Current Tags

  • 1.2.2                                ...           latest (2 years ago)

1 Versions

  • 1.2.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |