An ESLint plugin providing linting rules for Scoped CSS in Vue.js single-file components.
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.
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.
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.
ESLint plugin for Scoped CSS in Vue.js
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.
Works seamlessly with SCSS and Stylus in <style lang='scss'> and <style lang='stylus'> blocks, supporting common CSS extensions out of the box.
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.
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.
Requires installing separate parsers like postcss-scss for SCSS or postcss-styl for Stylus, adding setup complexity beyond standard ESLint.
Only explicitly supports SCSS and Stylus, missing other popular options like Less or plain Sass, which may require custom configurations.
Requires ESLint v9.38.0 and above, potentially blocking adoption in projects stuck on older versions or with strict dependency constraints.