vue/enforce-style-attribute
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/enforce-style-attribute": "error",
},
},
];Enforce or forbid the use of the scoped and module attributes in SFC top level style tags
<style module></style><style></style><style scoped></style><style scoped></style>
<style lang="scss" src="../path/to/style.scss" scoped></style><style module></style><style></style>Examples from the ESLint documentation.
vue/enforce-style-attribute
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/enforce-style-attribute": "error",
},
},
];Oxlint does not have this rule.
suspicious/useScopedStyles
suspicious · since 2.4.5
{
"linter": {
"rules": {
"suspicious": {
"useScopedStyles": "error"
}
}
}
}Disallow importing Vue compiler macros
Enforce Promise or callback style in nextTick
Enforce use of defineOptions instead of default export