I am getting following error in VS Code:
JavaScript
x
3
1
[vue/no-deprecated-slot-attribute]
2
`slot` attributes are deprecated. eslint-plugin-vue
3
I have these two plugin installed in .eslintrc.js
JavaScript
1
5
1
'extends': [
2
'plugin:vue/vue3-essential',
3
'eslint:recommended'
4
],
5
And this in rules:
JavaScript
1
2
1
'vue/no-deprecated-slot-attribute': 'off',
2
What should be done in order to avoid this issue?
Advertisement
Answer
This slot actually refers to webcomponent slots;
https://github.com/ionic-team/ionic-framework/issues/22236
The slots Ionic Framework uses are not the same as Vue 2 slots. The slots we use are Web Component slots and are valid usage: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots.
Developers should be using the Web Component slots to position elements as per our docs: https://ionicframework.com/docs/api/range#usage
Check to ensure your eslint.js has the following rule:
JavaScript
1
4
1
rules: {
2
'vue/no-deprecated-slot-attribute': 'off',
3
}
4
Next open .vscode/settings.json and add the following:
JavaScript
1
2
1
"vetur.validation.template": false,
2