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

fix: make the format script work on all platforms #37

Merged
merged 2 commits into from
Feb 3, 2022
Merged

Conversation

rojvv
Copy link
Collaborator

@rojvv rojvv commented Feb 3, 2022

No description provided.

@rojvv rojvv requested a review from ArnabXD February 3, 2022 10:24
@ArnabXD
Copy link
Member

ArnabXD commented Feb 3, 2022

I added this because lint-staged was having issues running prettier, you can add another script like format:lint-staged with the current command or replace npm run format with raw command in lint-staged

@ArnabXD ArnabXD closed this Feb 3, 2022
@ArnabXD
Copy link
Member

ArnabXD commented Feb 3, 2022

Closed by mistake

@ArnabXD ArnabXD reopened this Feb 3, 2022
@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

Can you try if it works when the Prettier command is this PR?

@ArnabXD
Copy link
Member

ArnabXD commented Feb 3, 2022

You suggested the same code in telegram group and initially and it was failing, can't remember the reason.. I will retest.

@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

Your current command does not format the TypeScript files in src/, it just formats the TypeScript files in its sub-directories.

@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

You can push any other fix to the package.json branch, if you have.

@ArnabXD
Copy link
Member

ArnabXD commented Feb 3, 2022

Your current command does not format the TypeScript files in src/, it just formats the TypeScript files in its sub-directories.

image

@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

image

@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

Seems like a platform problem.

@ArnabXD
Copy link
Member

ArnabXD commented Feb 3, 2022

give this a try

"prettier --write \"src/**/*.ts\""

@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

I just found out prettier --write src/**/*.ts works if I run it myself (npm not running it). Trying your suggestion in the format script now.

1 similar comment
@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

I just found out prettier --write src/**/*.ts works if I run it myself (npm not running it). Trying your suggestion in the format script now.

@rojvv
Copy link
Collaborator Author

rojvv commented Feb 3, 2022

@ArnabXD that works, you can push it to the package.json branch!

@ArnabXD
Copy link
Member

ArnabXD commented Feb 3, 2022

Found this here

@rojvv rojvv changed the title fix: correct the Prettier command fix: make the format script work on all platforms Feb 3, 2022
@rojvv rojvv merged commit 9314e2b into main Feb 3, 2022
@rojvv rojvv deleted the package.json branch February 3, 2022 15:24
@rojvv rojvv added the fix label Feb 3, 2022
@rojvv rojvv removed the fix label Jul 23, 2022
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.

2 participants