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

Add type support to the created eslintrc #5635

Open
NotWearingPants opened this issue Jun 30, 2020 · 0 comments
Open

Add type support to the created eslintrc #5635

NotWearingPants opened this issue Jun 30, 2020 · 0 comments

Comments

@NotWearingPants
Copy link

What problem does this feature solve?

It adds autocompletion in eslintrc and allows type-checking it.

What does the proposed API look like?

This can be done by installing @types/eslint and then adding the following type declaration to the top of the generated .eslintrc.js file:

/**
 * @type {import('eslint').Linter.Config<import('eslint/rules/index').ESLintRules>}
 */

This might be possible to instead do in a separate .d.ts file, but I'm not very proficient in typescript yet.

I'm not sure how to configure the type-checking to actually run on .eslintrc.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants