eslint-community / eslint-plugin-promise

Enforce best practices for JavaScript promises
ISC License
939 stars 91 forks source link

add TypeScript declaration file #488

Open brettz9 opened 1 month ago

brettz9 commented 1 month ago

Description

Add a TypeScript declaration file.

Steps to Reproduce

  1. Add import promise from 'eslint-plugin-promise'
  2. Hover over eslint-plugin-promise in VSC

Expected behavior: [What you expect to happen]

Get no errors.

Actual behavior: [What actually happens]

Get errors in VSC about TS types

brettz9 commented 1 month ago

Should we go all in with checkJs: true, basically going full JavaScript+JSDoc-as-TypeScript?

voxpelli commented 1 month ago

Real life example from neostandard: https://github.com/neostandard/neostandard/blob/08ae5469c71def357f0202fed2be9b83f62efc5a/lib/configs/base.js#L5

Should we go all in with checkJs: true, basically going full JavaScript+JSDoc-as-TypeScript?

I have a PR for that in another project, so I’m +1 on it

brettz9 commented 1 month ago

Will probably wait on #484 to begin any work here, as don't want the tooling to have to be outdated to be supported...

voxpelli commented 1 month ago

Agree @brettz9 👍 And I think @scagood is also interested in this topic :)