ximing / stylelint-wxss

A collection of WXSS specific linting rules for [stylelint](https://github.com/stylelint/stylelint) (in a form of plugin)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stylelint-wxss

A collection of WXSS specific linting rules for stylelint (in a form of plugin).

Installation and usage

npm install stylelint stylelint-wxss

Create the configuration file stylelint.config.js:

module.exports = {
  plugins: ['stylelint-wxss'],
  rules: {
    'wxss/selector-disallowed': ['tag']
  }
}

options.exclude

module.exports = {
  plugins: ['stylelint-wxss'],
  rules: {
    'wxss/selector-disallowed': [['tag'], {
      exclude: {
        tag: ['page']
      }
    }]
  }
}

options.glob

glob options: multimatch

module.exports = {
  plugins: ['stylelint-wxss'],
  rules: {
    'wxss/selector-disallowed': [['tag'], {
      // skip lint files under component directory
      glob: ['**', '!**/component/**']
    }]
  }
}

List of rules

wxss/selector-disallowed

To disable specific selector types.

About

A collection of WXSS specific linting rules for [stylelint](https://github.com/stylelint/stylelint) (in a form of plugin)


Languages

Language:JavaScript 91.1%Language:SCSS 8.9%