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

Unable to run lint-staged programmatically due to lack of types. #1359

Open
pauliesnug opened this issue Nov 13, 2023 · 2 comments
Open

Unable to run lint-staged programmatically due to lack of types. #1359

pauliesnug opened this issue Nov 13, 2023 · 2 comments

Comments

@pauliesnug
Copy link

Description

I'm working on a build tooling in which I want to be able to call lint-staged programmatically (i.e. as shown in the README FAQ). However, upon trying out the example in TypeScript I get the error Could not find a declaration file for module 'lint-staged'. Upon installing @types/lint-staged I still recieve an error because the DefinitelyTyped package doesn't include the correct types.

Steps to reproduce

Add the lint-staged dependency to a TypeScript project, attempt to import the CLI and run it as a function.

@iiroj
Copy link
Member

iiroj commented Nov 13, 2023

Thanks for the issue! I could add some index.d.ts file because the interface is pretty stable.

@pauliesnug
Copy link
Author

Thanks for the issue! I could add some index.d.ts file because the interface is pretty stable.

@iiroj that would be awesome! thank you for the quick response, amazing project

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

No branches or pull requests

2 participants