-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat: add declaration file #280
base: main
Are you sure you want to change the base?
Conversation
index.d.ts
Outdated
@@ -0,0 +1 @@ | |||
export const rules: Record<string, 0 | "off">; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this would be the correct TypeScript declaration:
export = {
rules: Record<string, 0 | "off">
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied from @types/eslint-config-prettier
. Maybe you are right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if there is alreay @types/eslint-config-prettier
, what the benefit to maintain it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JounQin Therea are many eslint config packages published to npm. eslint-config-prettier builtin support declaration file will be convenient for other packages so that they don't neeed to install both eslint-config-prettier
and @types/eslint-config-prettier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if there is alreay @types/eslint-config-prettier, what the benefit to maintain it here?
I'll echo zanminkian's comments here. It is really nice for have the types be included in the main package, as it avoids having to depend on two separate packages. Especially now that the year is 2024, TypeScript has spread across the ecosystem, and this is something that a lot of users will expect out of the box. And it is a pretty low maintenance cost for you!
Would love for this PR to be merged, as I was just avoid to start a new PR to this project for the exact same thing, and was surprised to see one already.
78f2020
to
b298462
Compare
b298462
to
048c4eb
Compare
048c4eb
to
ab5b567
Compare
No description provided.