[FIXED] ionic – `slot` attributes are deprecated – eslint-plugin-vue


I am getting following error in VS Code:

`slot` attributes are deprecated. eslint-plugin-vue

enter image description here

I have these two plugin installed in .eslintrc.js

  'extends': [

And this in rules:

'vue/no-deprecated-slot-attribute': 'off',

What should be done in order to avoid this issue?


This slot actually refers to webcomponent slots;

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:

  rules: {
    'vue/no-deprecated-slot-attribute': 'off',

Next open .vscode/settings.json and add the following:

  "vetur.validation.template": false,

Answered By – Lee

Answer Checked By – Mary Flores (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published