Thanks to visit codestin.com
Credit goes to github.com

Skip to content

🚀 Feature: Find or create a lint rule that enforces exported types #836

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

Open
3 tasks done
JoshuaKGoldberg opened this issue Sep 18, 2023 · 0 comments
Open
3 tasks done
Labels
status: blocked Waiting for something else to be resolved type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Sep 18, 2023

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

I see code like this a lot:

interface SomeSettings {
  something: string;
}

export function something(settings: SomeSettings) {
  // ...
}

IMO if an interface/type is used by something that's exported, it'd be good to export SomeSettings. That way if future folks want to use it, they won't have issues trying to import it.

Additional Info

Similar issue here: webpro-nl/knip#127.

I think part of this work should be:

  1. Seeing if it already exists in https://github.com/typescript-eslint/typescript-eslint/issues
  2. Waiting until that issue is either accepted or declined
    • If it's accepted, merging the PR into typescript-eslint
    • If it's declined, either making the rule in an existing community plugin (I don't know which if any would be a good place) or making a new plugin with the rule
@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: blocked Waiting for something else to be resolved labels Sep 18, 2023
@JoshuaKGoldberg JoshuaKGoldberg added this to the Long-Desired Features milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked Waiting for something else to be resolved type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

1 participant