JoshuaKGoldberg / JoshuaKGoldberg/create-typescript-app

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

Open
#836 0 comments 1 reaction 0 assignees View on GitHub
status: blocked type: feature
Dominant language
TypeScript
Stars
1.4k
Forks
89
Avg merge
1m
Merged PRs (30d)
3

Description

### Bug Report Checklist

- [X] I have tried restarting my IDE and the issue persists.
- [X] I have pulled the latest `main` branch of the repository.
- [X] I have [searched for related issues](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue) and found none that matched my issue.

### Overview

I see code like this a lot:

```ts
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: https://github.com/webpro/knip/issues/127.

I think part of this work should be:

1. ~Seeing if it already exists in https://github.com/typescript-eslint/typescript-eslint/issues~
* ~If it doesn't yet exist, filing a proper issue there~ I filed it: https://github.com/typescript-eslint/typescript-eslint/issues/7670
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.