microsoft / microsoft/TypeScript

Suggestion: Config files authored in JS should automatically have intellisense support

Open
#35,046 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Some libraries (e.g. Babel, Webpack, ESLint) use JS files for their config files.

We don't automatically provide IntelliSense support for these - however, the existing definitions (at least for Babel and Webpack) do provide types that describe the module shape of the files, so they can be manually set up today with a JSDoc comment.

It may be possible to provide a mechanism for associating these config files with their @types packages, and allowing those packages to specify that a given type expresses the module shape of the config file.

Courtesy of @uniqueiniquity

First suggested here: https://developercommunity.visualstudio.com/content/idea/385119/better-webpack-support.html

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the manual JSDoc setup described in the issue and how the Babel and Webpack definitions in @types express config module shapes. Define and implement an association mechanism for JavaScript config files, then verify that they receive IntelliSense without a JSDoc comment.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.