Skip to content

vue-scoped-css/enforce-style-type

enforce the <style> tags to be plain or have the scoped or module attribute

  • ⚙️ This rule is included in all of "plugin:vue-scoped-css/all", "plugin:vue-scoped-css/recommended" and "plugin:vue-scoped-css/vue3-recommended".

📖 Rule Details

This rule reports invalid <style> tag types.

Now loading...

🔧 Options

Default is set to { allows: ['scoped'] }.

json
{
  "vue-scoped-css/enforce-style-type": ["error", { "allows": ["scoped"] }]
}
  • allows (default ['scoped']) ... allowed types of <style> tags. Possible values: plain, scoped, module

allows: ['module']

Only allow CSS Modules.

Now loading...

allows: ['plain']

Only allow plain styles; no scoped or module attributes.

Now loading...

📚 Further reading

Implementation