Glob issues with 4.2.2 and Prettier
See original GitHub issueStarting with lint-staged
version 4.2.2 I have glob issues when using with husky and prettier. Here’s my lint-staged config:
"lint-staged": {
"{app,test,config}/**/*.js": [
"prettier --single-quote --tab-width 4 --print-width 100 --no-bracket-spacing --write",
"eslint --fix --max-warnings 0",
"git add"
]
}
And here’s the error from prettier:
husky > npm run -s precommit (node v6.11.3)
❯ Running tasks for {app,test,config}/**/*.js
✖ prettier --single-quote --tab-width 4 --print-width 100 --no-bracket-spacing --write
→ TypeError: patterns must be a string or an array of strings
eslint --fix --max-warnings 0
git add
✖ prettier --single-quote --tab-width 4 --print-width 100 --no-bracket-spacing --write found some errors. Please fix them and try committing again.
Unable to expand glob patterns: {app,test,config}/**/*.js 4 100 /home/user/dev/my-app/app/entity/myEntity.js !**/node_modules/** !./node_modules/**
TypeError: patterns must be a string or an array of strings
Anyways, thanks for making this awesome tool and if I have time this weekend I’d be glad to look into this problem myself, just wanted to get this out for others to look at ASAP.
Issue Analytics
- State:
- Created 6 years ago
- Comments:24 (3 by maintainers)
Top Results From Across the Web
Issues updating ender 3 with a 4.2.2 board. : r/ender3 - Reddit
I tried moving the z, x, and y axes seperately but no go. Dissabling the stepper motors does work and the bed and...
Read more >TypeScript and Prettier with Yarn PnP not working in 2021.1
Imports for npm packages are not being resolved and TypeScript defaults to the bundled language version I think which is 4.2.2. Prettier is...
Read more >Prettier+ - Visual Studio Marketplace
Extension for Visual Studio Code - Prettier (code formatter) for the VS Code.
Read more >Release Notes for MongoDB 4.4
All JIRA issues closed in 4.4.18 · 4.4.18 Changelog ... WT-7995 : Fix the global visibility that it cannot go beyond checkpoint visibility....
Read more >Creality Ender 3 V2 Upgrades V4.2.7 Silent Board, 32 Bit ...
The Board is Optimized by Circuit, effectively solve the Heating Problem. ... Una para mi Ender 3 V2 que venia con la 4.2.2,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cloud-walker See https://github.com/okonet/lint-staged#what-commands-are-supported
@cloud-walker IMO it’s not a good approach to name your npm scripts like this:
could you try to rename those scripts, for example to be:
after that, run
npm run precommit
again. doeslint-staged
work as expected?