No staged files match src/**/*.{ts,tsx}
See original GitHub issueWhy I get this error while run precommit script?
MBP-Pavel:components pavel$ nvm version
v8.5.0
MBP-Pavel:components pavel$ node -v
v8.5.0
MBP-Pavel:components pavel$ npm -v
5.5.1
MBP-Pavel:components pavel$ npm run precommit
> components@0.1.0 precommit /Users/pavel/Work/astralnalog/components
> lint-staged
↓ Running tasks for src/**/*.{ts,tsx} [skipped]
→ No staged files match src/**/*.{ts,tsx}
package.json
"devDependencies": {
...
"husky": "^0.15.0-beta.11",
"lint-staged": "^4.3.0",
"prettier": "^1.7.4",
"tslint": "^5.8.0",
"typescript": "^2.5.3",
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
.lintstagedrc
{
"src/**/*.{ts,tsx}": ["prettier --write", "git add"]
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:14
Top Results From Across the Web
Lint-staged can't find staged files matching glob - Stack Overflow
The error I'm getting: No staged files match any of provided globs. What is the right config for my package.json ...
Read more >Husky + Lint-Staged on a React TypeScript Project
The commit was blocked because Husky called Lint-Staged command that called the ESLint rule check, and as we expected the rule “no-unused-vars” ...
Read more >lint-staged - npm
Linter commands work on a subset of all staged files, defined by a glob pattern. lint-staged uses micromatch for matching files with the ......
Read more >lint-staged - Bountysource
When lint-staged is run the .eslintrc.json file is ignored. ... via husky/lint-staged it does not yield the same result as it ignores my...
Read more >Use ESLint, Prettier like Pro on React Native
Also, I will introduce Husky and lint-staged, and how to use them like Pro. ... {ts,tsx} [skipped] → No staged files match src/**/*....
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
I solved my problem, I had a space in between
ts
, andtsx
change in.lintstagedrc.json
from"*.{ts, tsx}"
to"*.{ts,tsx}"
having a single type, i.e.
*.{js}
can also break it, use*.js