Gathering detailed insights and metrics for eslint-plugin-vue-scoped-css
Gathering detailed insights and metrics for eslint-plugin-vue-scoped-css
Gathering detailed insights and metrics for eslint-plugin-vue-scoped-css
Gathering detailed insights and metrics for eslint-plugin-vue-scoped-css
ESLint plugin for Scoped CSS in Vue.js
npm install eslint-plugin-vue-scoped-css
Typescript
Module System
Min. Node Version
Node Version
NPM Version
89.9
Supply Chain
92.9
Quality
80.3
Maintenance
100
Vulnerability
96.4
License
TypeScript (89.4%)
Vue (9.63%)
JavaScript (0.97%)
Total Downloads
8,962,244
Last Day
1,889
Last Week
68,253
Last Month
327,524
Last Year
3,553,657
MIT License
107 Stars
387 Commits
12 Forks
2 Watchers
9 Branches
9 Contributors
Updated on May 21, 2025
Minified
Minified + Gzipped
Latest Version
2.10.0
Package Id
eslint-plugin-vue-scoped-css@2.10.0
Unpacked Size
302.18 kB
Size
52.57 kB
File Count
151
NPM Version
10.8.2
Node Version
20.19.1
Published on
May 21, 2025
Cumulative downloads
Total Downloads
8
2
46
eslint-plugin-vue-scoped-css is ESLint plugin for Scoped CSS in Vue.js.
This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using Scoped CSS in Vue.js.
<style lang="scss">
.<style lang="stylus">
.<style>
, <template>
and <script>
blocks.You can check on the Online DEMO.
See documents.
1npm 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
eslint.config.js
)Use eslint.config.js
file to configure rules. See also: https://eslint.org/docs/latest/use/configure/configuration-files-new.
Example eslint.config.js:
1import eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css'; 2export default [ 3 // add more generic rule sets here, such as: 4 // js.configs.recommended, 5 ...eslintPluginVueScopedCSS.configs['flat/recommended'], 6 { 7 rules: { 8 // override/add rules settings here, such as: 9 // 'vue-scoped-css/no-unused-selector': 'error' 10 } 11 } 12];
.eslintrc
)Use .eslintrc.*
file to configure rules. See also: https://eslint.org/docs/latest/use/configure/.
Example .eslintrc.js:
1module.exports = { 2 extends: [ 3 // add more generic rulesets here, such as: 4 // 'eslint:recommended', 5 'plugin:vue-scoped-css/vue3-recommended' 6 ], 7 rules: { 8 // override/add rules settings here, such as: 9 // 'vue-scoped-css/no-unused-selector': 'error' 10 } 11}
This plugin provides some predefined configs:
eslint.config.js
)*.configs['flat/base']
- Settings and rules to enable this plugin*.configs['flat/recommended']
- /base
, plus rules for better ways to help you avoid problems for Vue.js 3.x*.configs['flat/vue2-recommended']
- /base
, plus rules for better ways to help you avoid problems for Vue.js 2.x*.configs['flat/all']
- All rules of this plugin are included.eslintrc
)plugin:vue-scoped-css/base
- Settings and rules to enable this pluginplugin:vue-scoped-css/recommended
- /base
, plus rules for better ways to help you avoid problems for Vue.js 2.xplugin:vue-scoped-css/vue3-recommended
- /base
, plus rules for better ways to help you avoid problems for Vue.js 3.xplugin:vue-scoped-css/all
- All rules of this plugin are includedThe --fix
option on the command line automatically fixes problems reported by rules which have a wrench :wrench: below.
Enforce all the rules in this category with:
1export default [ 2 ...eslintPluginVueScopedCSS.configs['flat/recommended'], 3]
or
1{ 2 "extends": ["plugin:vue-scoped-css/vue3-recommended"] 3}
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 | :wrench: |
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() | :wrench: |
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() |
Enforce all the rules in this category with:
1export default [ 2 ...eslintPluginVueScopedCSS.configs['flat/vue2-recommended'], 3]
or
1{ 2 "extends": ["plugin:vue-scoped-css/recommended"] 3}
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> |
No preset enables the rules in this category. Please enable each rule if you want.
For example:
1{ 2 "rules": { 3 "vue-scoped-css/no-deprecated-v-enter-v-leave-class": "error" 4 } 5}
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> | |
vue-scoped-css/v-deep-pseudo-style | enforce :deep() /::v-deep() style | :wrench: |
vue-scoped-css/v-global-pseudo-style | enforce :global() /::v-global() style | :wrench: |
vue-scoped-css/v-slotted-pseudo-style | enforce :slotted() /::v-slotted() style | :wrench: |
Rule ID | Replaced by |
---|---|
vue-scoped-css/require-scoped | vue-scoped-css/enforce-style-type |
Welcome contributing!
Please use GitHub's Issues/PRs.
npm test
runs tests and measures coverage.npm run update
runs in order to update readme and recommended configuration.See the LICENSE file for license rights and limitations (MIT).
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5
Reason
Found 3/24 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-02
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-34.1%
1,889
Compared to previous day
Last Week
-16.4%
68,253
Compared to previous week
Last Month
-22.8%
327,524
Compared to previous month
Last Year
41.7%
3,553,657
Compared to previous year