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

Inaccurate type externalization recommendations #49

Open
2 tasks
privatenumber opened this issue Dec 10, 2023 · 0 comments
Open
2 tasks

Inaccurate type externalization recommendations #49

privatenumber opened this issue Dec 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@privatenumber
Copy link
Owner

Problem


Recommendation: "@types/eslint" is externalized because "eslint" is in "peerDependencies". Place "@types/eslint" in "peerDependencies" as well so users don't have missing types.
Recommendation: "@types/eslint__eslintrc" is externalized because "@eslint/eslintrc" is in "dependencies". Place "@types/eslint__eslintrc" in "dependencies" as well so users don't have missing types.
Recommendation: "@types/eslint__js" is externalized because "@eslint/js" is in "dependencies". Place "@types/eslint__js" in "dependencies" as well so users don't have missing types.
Recommendation: "@types/confusing-browser-globals" is externalized because "confusing-browser-globals" is in "dependencies". Place "@types/confusing-browser-globals" in "dependencies" as well so users don't have missing types.

However, my type file only imports from eslint:

import { Linter } from 'eslint';

/**
 * These specific signatures are needed to make sure that the return type is
 * narrowed to the input type.
 */
declare function defineConfig<T extends Linter.FlatConfig>(config: T): T;
declare function defineConfig<T extends Linter.FlatConfig[]>(config: T): T;

type Options = {
    node?: boolean;
};
declare const pvtnbr: (options?: Options) => Linter.FlatConfig[];

export { type Options, defineConfig, pvtnbr };

Expected behavior

To only recommend externalizing types that are imported/bundled

Minimal reproduction URL

N/A

Version

N/A

Node.js version

N/A

Package manager

npm

Operating system

macOS

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project
@privatenumber privatenumber added the bug Something isn't working label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant