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 TypeScript definition #50

Closed
wants to merge 14 commits into from
Closed

Add TypeScript definition #50

wants to merge 14 commits into from

Conversation

sovcik
Copy link

@sovcik sovcik commented Jan 12, 2020

Trivial declaration file for typescript so VS Code won't yell while editing webpack config file...

@sindresorhus
Copy link
Owner

Thanks for creating a TypeScript definition. 🙌 Can you follow this styleguide?

Some examples:

@sovcik
Copy link
Author

sovcik commented Jan 19, 2020

Tried my best :-)

@sovcik
Copy link
Author

sovcik commented Jan 19, 2020

Ok, not the best. Adding few things - like tds test...

index.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Show resolved Hide resolved
@sindresorhus sindresorhus changed the title adding simple declaration file for typescript Add TypeScript definition Jan 21, 2020
@sovcik
Copy link
Author

sovcik commented Jan 21, 2020

Well, the best would be to update @types/eslint first and then make format of type Formatter. I've created PR at DefinitelyTYped for that - will modify it here once is approved/merged there.

Copy link
Author

@sovcik sovcik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes accepted

@sovcik
Copy link
Author

sovcik commented Jan 22, 2020

I hope it's better now.

@param results - Lint result for the individual files.
@param data - Extended information related to the analysis results.
@returns The formatted output.
*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the doc comment should be added to the type in DefinitelyTyped. That way every consumer benefits from it and it can be properly kept in sync with ESLint changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Please, go ahead and create PR.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, but I don't have time to do that. You are the one that wants this to be merged.

@sindresorhus
Copy link
Owner

#52

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

2 participants