Sagar Kapoor
Accessibility ES Lint plugin with Nuxt3
@kapa.ai Where can I read more about this?
To incorporate the eslint-plugin-vuejs-accessibility plugin, you would modify this structure like so:
import withNuxt from './.nuxt/eslint.config.mjs'
import pluginVueA11y from "eslint-plugin-vuejs-accessibility";
export default withNuxt(
// your custom flat configs go here
{
plugins: {
'vuejs-accessibility': pluginVueA11y
},
rules: {
// Your custom rules here
"vuejs-accessibility/alt-text": "error",
// ... other rules
}
}
)
19 replies
Accessibility ES Lint plugin with Nuxt3
@kapa.ai Why does the official doc have spread operator then?
import pluginVueA11y from "eslint-plugin-vuejs-accessibility";
export default [
// add more generic rulesets here, such as:
// js.configs.recommended,
...pluginVueA11y.configs["flat/recommended"],
{
rules: {
// override/add rules settings here, such as:
// "vuejs-accessibility/alt-text": "error"
}
}
];
19 replies
Getting error when running ESLint & Prettier"Disallow self-closing on HTML void elements (<img/>)"
All right, this is something that is an issue with how Prettier is opinionated. Nothing can be really done about it. Apart from configuring ESLint to ignore this warning if I want to continue using Prettier.
2 replies