PaulRBerg / foundry-template

Foundry-based template for developing Solidity smart contracts
MIT License
561 stars 110 forks source link

Fix prettier glob pattern in package.json #48

Closed mariogutval closed 7 months ago

mariogutval commented 7 months ago

After some testing, the glob patterns in package.json are not hitting all the files when there are nested folders.

I suggest to add single quotes to prevent undesired behaviours (I tested it and everything was fixed with this approach):

image

PaulRBerg commented 7 months ago

Thanks for taking the time to report this.

Unfortunately, single quotes don't work on Windows.

Could you share an example of a file structure where the escaped double-character does not hit all the files in the nested folders?

mariogutval commented 7 months ago

Unfortunately, single quotes don't work on Windows.

Oh, that's true.

Could you share an example of a file structure where the escaped double-character does not hit all the files in the nested folders?

In my repo, I have a helper contract in test/utils. Full path would be test/utils/Helper.sol.

mariogutval commented 7 months ago

Not only that file is ignored. You can compare the files that are hit prior to the fix and after: image image

PaulRBerg commented 7 months ago

What OS and shell are you using?

We've been using \" at Sablier for a long time, and we've never had any issues with nested files.

mariogutval commented 7 months ago

What OS and shell are you using?

macOS 14.4

We've been using \" at Sablier for a long time, and we've never had any issues with nested files.

That also works for me!

PaulRBerg commented 7 months ago

I had thought that this repo was also using \". Good catch, @mariogutval!