Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-plugin-query): export Plugin interface #8392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vojty
Copy link

@vojty vojty commented Dec 3, 2024

Problem

I'm generating TS declaration files from a reusable ESlint config (plain JavaScript) like this:

import queryPlugin from '@tanstack/eslint-plugin-query';

export default [
  {
    plugins: {
      '@tanstack/query': queryPlugin,
    },
    settings: { ... },
    rules: {
      // @tanstack/query:recommended rules
      ...queryPlugin.configs.recommended.rules,
      ...
    },
  },
];

I've upgraded TypeScript to 5.7.2 and I'm getting the following error:

error TS9006: Declaration emit for this file requires using private name 'Plugin' from module '"<...>/node_modules/@tanstack/eslint-plugin-query/dist/esm/index"'. An explicit type annotation may unblock declaration emit.

2 import queryPlugin from '@tanstack/eslint-plugin-query';
  ~~~~~~

Solution

Exporting Plugin interface fixes this issue.

@vojty
Copy link
Author

vojty commented Dec 18, 2024

@TkDodo I'm sure you are busy but could you take a look at this small change, please? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant