vue/block-lang
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/block-lang": "error",
},
},
];<script>
</script><script lang="js">
</script><template>
<div />
</template><script lang="ts">
</script><script>
</script><template>
<div />
</template>
<script setup lang="ts">
</script>Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/block-lang
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/block-lang": "error",
},
},
];Oxlint does not have this rule.
nursery/useConsistentBlockLang
nursery · since 2.6.0
{
"linter": {
"rules": {
"nursery": {
"useConsistentBlockLang": "error"
}
}
}
}Disallow usage of button without an explicit type attribute
Require component name property to match its file name
Disallow constant expressions in conditions in <template>