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

feat: add declaration file #280

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zanminkian
Copy link

No description provided.

index.d.ts Outdated
@@ -0,0 +1 @@
export const rules: Record<string, 0 | "off">;
Copy link
Member

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">
}

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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

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

Successfully merging this pull request may close these issues.

None yet

3 participants