All Projects → future-architect → eslint-plugin-vue-scoped-css

future-architect / eslint-plugin-vue-scoped-css

Licence: MIT license
ESLint plugin for Scoped CSS in Vue.js

Programming Languages

typescript
32286 projects
Vue
7211 projects

Projects that are alternatives of or similar to eslint-plugin-vue-scoped-css

Eslint Plugin Vue
Official ESLint plugin for Vue.js
Stars: ✭ 3,592 (+6093.1%)
Mutual labels:  eslint-plugin, static-analysis, npm-package
Eslint Plugin Node
Additional ESLint's rules for Node.js
Stars: ✭ 740 (+1175.86%)
Mutual labels:  eslint-plugin, npm-package
Eslint Plugin Sonarjs
SonarJS rules for ESLint
Stars: ✭ 458 (+689.66%)
Mutual labels:  eslint-plugin, static-analysis
Eslint Plugin Eslint Comments
Additional ESLint rules for directive comments of ESLint.
Stars: ✭ 221 (+281.03%)
Mutual labels:  eslint-plugin, npm-package
unimport
unimport is a Go static analysis tool to find unnecessary import aliases.
Stars: ✭ 64 (+10.34%)
Mutual labels:  static-analysis
phpstan-webmozart-assert
PHPStan extension for webmozart/assert
Stars: ✭ 132 (+127.59%)
Mutual labels:  static-analysis
sonarlint4netbeans
SonarLint integration for Apache Netbeans
Stars: ✭ 23 (-60.34%)
Mutual labels:  static-analysis
ng-charts
🎨📉 A fully functional Angular 14+ Chart.js library based from ng2-charts
Stars: ✭ 14 (-75.86%)
Mutual labels:  npm-package
eslint-plugin-todo-plz
Enforce consistent and maintainable TODO comments
Stars: ✭ 19 (-67.24%)
Mutual labels:  npm-package
2018-package-three-webpack-plugin
[ARCHIVED] Webpack plugin to use Three.js "examples" classes
Stars: ✭ 45 (-22.41%)
Mutual labels:  npm-package
go-mnd
Magic number detector for Go.
Stars: ✭ 153 (+163.79%)
Mutual labels:  static-analysis
rstatic
An R package for static analysis of R code.
Stars: ✭ 32 (-44.83%)
Mutual labels:  static-analysis
stimulus-content-loader
A Stimulus controller to asynchronously load HTML from an url.
Stars: ✭ 39 (-32.76%)
Mutual labels:  npm-package
arcscord
A Discord library written in typescript
Stars: ✭ 18 (-68.97%)
Mutual labels:  npm-package
phpstan-dba
PHPStan based SQL static analysis and type inference for the database access layer
Stars: ✭ 163 (+181.03%)
Mutual labels:  static-analysis
intersection-wasm
Mesh-Mesh and Triangle-Triangle Intersection tests based on the algorithm by Tomas Akenine-Möller
Stars: ✭ 17 (-70.69%)
Mutual labels:  npm-package
deps-infer
Infer mvn deps from sources
Stars: ✭ 36 (-37.93%)
Mutual labels:  static-analysis
phpstan.el
Interface to PHPStan (PHP static analyzer)
Stars: ✭ 22 (-62.07%)
Mutual labels:  static-analysis
node-reactive-postgres
Reactive queries for PostgreSQL
Stars: ✭ 28 (-51.72%)
Mutual labels:  npm-package
eslint-plugin-chai-friendly
Makes eslint friendly towards Chai.js 'expect' and 'should' statements.
Stars: ✭ 49 (-15.52%)
Mutual labels:  eslint-plugin

eslint-plugin-vue-scoped-css

eslint-plugin-vue-scoped-css is ESLint plugin for Scoped CSS in Vue.js.

NPM license NPM version NPM downloads NPM downloads NPM downloads NPM downloads NPM downloads Build Status Coverage Status

Features

This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using Scoped CSS in Vue.js.

  • Provides linting rules for Scoped CSS.
  • Supports CSS syntax including level 4 selectors.
  • Supports <style lang="scss">.
  • Supports <style lang="stylus">.
  • Parses <style>, <template> and <script> blocks.

You can check on the Online DEMO.

Documentation

See documents.

Installation

npm install --save-dev eslint eslint-plugin-vue-scoped-css vue-eslint-parser

Requirements

  • ESLint v6.0.0 and above
  • Node.js v12.22.x, v14.17.x, v16.x and above

Usage

Create .eslintrc.* file to configure rules. See also: http://eslint.org/docs/user-guide/configuring.

Example .eslintrc.js:

module.exports = {
  extends: [
    // add more generic rulesets here, such as:
    // 'eslint:recommended',
    'plugin:vue-scoped-css/vue3-recommended'
  ],
  rules: {
    // override/add rules settings here, such as:
    // 'vue-scoped-css/no-unused-selector': 'error'
  }
}

Configs

This plugin provides some predefined configs:

  • plugin:vue-scoped-css/base - Settings and rules to enable this plugin
  • plugin:vue-scoped-css/recommended - /base, plus rules for better ways to help you avoid problems for Vue.js 2.x
  • plugin:vue-scoped-css/vue3-recommended - /base, plus rules for better ways to help you avoid problems for Vue.js 3.x
  • plugin:vue-scoped-css/all - All rules of this plugin are included

Rules

The --fix option on the command line automatically fixes problems reported by rules which have a wrench 🔧 below.

Recommended for Vue.js 3.x

Enforce all the rules in this category with:

{
  "extends": "plugin:vue-scoped-css/vue3-recommended"
}
Rule ID Description
vue-scoped-css/enforce-style-type enforce the <style> tags to be plain or have the scoped or module attribute
vue-scoped-css/no-deprecated-deep-combinator disallow using deprecated deep combinators 🔧
vue-scoped-css/no-parent-of-v-global disallow parent selector for ::v-global pseudo-element
vue-scoped-css/no-parsing-error disallow parsing errors in <style>
vue-scoped-css/no-unused-keyframes disallow @keyframes which don't use in Scoped CSS
vue-scoped-css/no-unused-selector disallow selectors defined in Scoped CSS that don't use in <template>
vue-scoped-css/require-v-deep-argument require selector argument to be passed to ::v-deep() 🔧
vue-scoped-css/require-v-global-argument require selector argument to be passed to ::v-global()
vue-scoped-css/require-v-slotted-argument require selector argument to be passed to ::v-slotted()

Recommended for Vue.js 2.x

Enforce all the rules in this category with:

{
  "extends": "plugin:vue-scoped-css/recommended"
}
Rule ID Description
vue-scoped-css/enforce-style-type enforce the <style> tags to be plain or have the scoped or module attribute
vue-scoped-css/no-parsing-error disallow parsing errors in <style>
vue-scoped-css/no-unused-keyframes disallow @keyframes which don't use in Scoped CSS
vue-scoped-css/no-unused-selector disallow selectors defined in Scoped CSS that don't use in <template>

Uncategorized

No preset enables the rules in this category. Please enable each rule if you want.

For example:

{
  "rules": {
    "vue-scoped-css/no-deprecated-v-enter-v-leave-class": "error"
  }
}
Rule ID Description
vue-scoped-css/no-deprecated-v-enter-v-leave-class disallow v-enter and v-leave classes.
vue-scoped-css/require-selector-used-inside disallow selectors defined that is not used inside <template>

Deprecated

  • ⚠️ We're going to remove deprecated rules in the next major release. Please migrate to successor/new rules.
  • 😇 We don't fix bugs which are in deprecated rules since we don't have enough resources.
Rule ID Replaced by
vue-scoped-css/require-scoped vue-scoped-css/enforce-style-type

Contributing

Welcome contributing!

Please use GitHub's Issues/PRs.

Development Tools

  • npm test runs tests and measures coverage.
  • npm run update runs in order to update readme and recommended configuration.

License

See the LICENSE file for license rights and limitations (MIT).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].