Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ESLint
  3. VueJS Scoped CSS

VueJS Scoped CSS

MITTypeScriptv3.1.1

An ESLint plugin providing linting rules for Scoped CSS in Vue.js single-file components.

Visit WebsiteGitHubGitHub
108 stars13 forks0 contributors

What is VueJS Scoped CSS?

eslint-plugin-vue-scoped-css is an ESLint plugin that provides linting rules specifically for Scoped CSS in Vue.js single-file components. It helps developers avoid common pitfalls by analyzing CSS selectors, ensuring they are used within templates, and enforcing best practices for scoped styles. The plugin supports CSS, SCSS, and Stylus syntax, and includes auto-fixable rules to streamline code maintenance.

Target Audience

Vue.js developers working with single-file components who use Scoped CSS and want to enforce style consistency, prevent unused CSS, and avoid scoping-related errors. It's particularly useful for teams aiming to maintain high code quality in Vue applications.

Value Proposition

Developers choose this plugin because it offers specialized, Vue-focused linting for Scoped CSS that generic ESLint rules don't cover. Its deep integration with Vue template parsing, support for CSS preprocessors, and auto-fix capabilities make it a practical tool for improving style reliability and developer workflow.

Overview

ESLint plugin for Scoped CSS in Vue.js

Use Cases

Best For

  • Enforcing Scoped CSS best practices in Vue.js projects
  • Detecting unused CSS selectors in Vue single-file components
  • Preventing deprecated deep combinator usage in Vue 3
  • Linting SCSS or Stylus within Vue component styles
  • Ensuring CSS selectors align with Vue template structure
  • Automatically fixing common Scoped CSS syntax issues

Not Ideal For

  • Projects using global CSS exclusively without any scoped styles in Vue components
  • Teams already using comprehensive CSS linting tools like stylelint that cover Vue-specific scoping rules
  • Applications with minimal or no CSS where the configuration overhead isn't justified

Pros & Cons

Pros

Deep Vue Integration

Parses <style>, <template>, and <script> blocks together to detect unused CSS selectors by comparing them to the template, as shown in the no-unused-selector rule.

Preprocessor Support

Works seamlessly with SCSS and Stylus in <style lang='scss'> and <style lang='stylus'> blocks, supporting common CSS extensions out of the box.

Auto-fix Capabilities

Includes automatic fixes for issues like deprecated deep combinators and pseudo-element styles, helping teams migrate to Vue 3 syntax without manual edits, as indicated by wrench icons in rules.

Version-specific Configs

Provides predefined configs for Vue.js 3.x and 2.x, tailoring rules to framework-specific Scoped CSS behaviors, mentioned in the recommended and vue2-recommended presets.

Cons

Additional Parser Dependencies

Requires installing separate parsers like postcss-scss for SCSS or postcss-styl for Stylus, adding setup complexity beyond standard ESLint.

Limited Preprocessor Coverage

Only explicitly supports SCSS and Stylus, missing other popular options like Less or plain Sass, which may require custom configurations.

ESLint Version Lock-in

Requires ESLint v9.38.0 and above, potentially blocking adoption in projects stuck on older versions or with strict dependency constraints.

Frequently Asked Questions

Quick Stats

Stars108
Forks13
Contributors0
Open Issues10
Last commit6 days ago
CreatedSince 2019

Tags

#stylus#css-linting#npm#npm-package#scoped-css#frontend-tooling#code-quality#vuejs#eslint-plugin#eslint#scss#vue#static-analysis#css

Links & Resources

Website

Included in

ESLint4.7k
Auto-fetched 6 hours ago

Related Projects

React HooksReact Hooks

The library for web and native user interfaces.

Stars246,691
Forks51,164
Last commit7 hours ago
MeteorMeteor

Meteor, the JavaScript App Platform

Stars44,802
Forks5,242
Last commit15 hours ago
ReactReact

React-specific linting rules for ESLint

Stars9,289
Forks2,733
Last commit2 months ago
VueJSVueJS

Official ESLint plugin for Vue.js

Stars4,592
Forks715
Last commit20 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub