Skip to content

"vue/no-deprecated-slot-attribute" doesn't accept any properties #2826

@MaxGeldner

Description

@MaxGeldner

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 9.31.0
  • eslint-plugin-vue version: 10.3.0
  • Vue version: 3.5.16
  • Node version: 22.13.0
  • Operating System: MacOS (issue also is present on Windows 11)

Please show your full configuration:
eslint.config.ts

import { globalIgnores } from 'eslint/config';
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
import pluginVue from 'eslint-plugin-vue';
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';

export default defineConfigWithVueTs(
  {
    name: 'app/files-to-lint',
    files: ['**/*.{ts,mts,tsx,vue}'],
  },

  globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),

  pluginVue.configs['flat/essential'],
  vueTsConfigs.recommended,
  skipFormatting,
  {
    rules: {
      'vue/no-deprecated-slot-attribute': [
        'error',
        {
          ignore: [/^shine-/], // also doesn't work when using a string
          ignoreParents: [/^shine-/],
        },
      ],
    },
  },
);

What did you do?

<shine-dialog>
  <div slot="header-text">{{ actionTextDialogHeader }}</div>
</shine-dialog>

What did you expect to happen?
ESLint should run and allow the usage of the native slot attribute with all components starting with shine- and all its descendents.

What actually happened?
As per https://eslint.vuejs.org/rules/no-deprecated-slot-attribute, the rule accepts props, but an error occurs when running eslint:

Oops! Something went wrong! :(

ESLint: 9.31.0

Error: Key "rules": Key "vue/no-deprecated-slot-attribute":
Value {"ignore":["/^shine-/"],"ignoreParents":["/^shine-/"]} should NOT have additional properties.
Unexpected property "ignoreParents". Expected properties: "ignore".

Repository to reproduce this issue
git clone, npm i, npm run dev and npx eslint ./src/App.vue on this repo:
https://github.com/MaxGeldner/eslint-deprecated-slots-reproducer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions