github / github/eslint-plugin-github

Add TypeScript declaration file

Open
#606 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
336
Forks
67
Avg merge
1d 9h
Merged PRs (30d)
6

Description

In order to make the TypeScript language server see what actually is inside `eslint-plugin-github`, and to correctly suggest `github.getFlatConfigs`, I would like to request the addition of a declaration file.

```console
Could not find a declaration file for module 'eslint-plugin-github'. '/Users/robin/Sites/eslint-config-sweet/node_modules/eslint-plugin-github/lib/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/eslint-plugin-github` if it exists or add a new declaration (.d.ts) file containing `declare module 'eslint-plugin-github';`ts(7016)
```

Contributor guide

Open the contributing guide

Research direction

Start by inspecting lib/index.js, the module path shown in the TypeScript error, to identify the exported API, including github.getFlatConfigs. Add a declaration file that represents those exports, then verify that the TypeScript language server no longer reports the missing declaration and can suggest getFlatConfigs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.