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

chore: Add .ts files to lint-staged #109

Merged
merged 2 commits into from
Aug 26, 2024
Merged

chore: Add .ts files to lint-staged #109

merged 2 commits into from
Aug 26, 2024

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Aug 20, 2024

Prerequisites checklist

What is the purpose of this pull request?

Ensure .ts files are linted on precommit

What changes did you make? (Give an overview)

  • Added .ts files to the lint-staged config in package.json

Related Issues

Is there anything you'd like reviewers to focus on?

Copy link
Member

@amareshsm amareshsm left a comment

Choose a reason for hiding this comment

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

LGTM

package.json Outdated
@@ -20,7 +20,7 @@
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.js": [
"*.{js|ts}": [
Copy link
Member

Choose a reason for hiding this comment

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

"!(*.js)": "prettier --write --ignore-unknown"

We also have this where we run prettier? Does that mean for .ts prettier will run twice now?

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

I think this PR change may be unnecessary since we're already linting .ts files.
Ref #22 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Added .ts to the second entry to ensure it won't be run through prettier twice.

Copy link
Member

Choose a reason for hiding this comment

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

Added .ts to the second entry to ensure it won't be run through prettier twice.

Maybe this change isn't pushed?

Copy link
Member

@harish-sethuraman harish-sethuraman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit ae9d5e9 into main Aug 26, 2024
14 checks passed
@mdjermanovic mdjermanovic deleted the lint-ts-staged branch August 26, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

4 participants