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 "recommended", "vue2-recommended" and "all".

📖 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 ​