Comments (4)
Ok, I found the problem. In your config you have
"eslint": "eslint --ext .js static",
"stylelint": "stylelint 'static/sass/**/*.scss'",
including extensions. lint-staged
is looking at the package.json
for scripts with the names you specified in lint-staged
section:
"lint-staged": {
"*.js": "eslint",
"*.scss": "stylelint"
}
So in this case it will call npm run stylelint
that will lint all your files that match the glob.
The most easy change would be to rename those tasks so they don't collide with real bin names. See okcoker/lint-staged-problem#1
from lint-staged.
It doesn't happen to me and it isn't how it should be. Can you put a repo with your files and your config so i can reproduce it on my own?
from lint-staged.
Add a new line to nonerror.scss
or nonerror.js
and try to commit them. Here's a screenshot of the problem too.
from lint-staged.
Ah interesting. This works for me, thanks! Successfully upgraded.
from lint-staged.
Related Issues (20)
- Not all lintstagedrc.json files are found in the rush.js monorepo HOT 4
- Type '(filenames: string[]) => Commands | Promise<Commands>' is not assignable to type 'string' HOT 2
- There is a bug with bracketed folders HOT 5
- Importing a reusable json file to ESM JS config fails HOT 1
- Path for baseConfig HOT 2
- lint-staged is unable to resolve path to module in Monorepo with map imports HOT 9
- Many errors in standard output when using git sparse-checkout HOT 4
- `--all` flag HOT 3
- lint-staged repeat many time ,when commit in windows powershell,cmd HOT 2
- [feat] override the current pattern HOT 1
- Make lint-staged more compatible with git sparse checkout feature HOT 6
- How to `git reset $file` ? HOT 3
- How to output the print content of the script in lint-staged in real time?
- `npx lint-staged --cwd $PWD` for all OS HOT 6
- Hooks to know if the lint staged commands have completed HOT 4
- Prettier breaks when run through lint-staged on files with dollar sign ($) in the name HOT 6
- Consider allowing running of programatic tasks via Node API HOT 5
- Is it possible to run 2 different configurations for pre-commit and pre-push? HOT 1
- No staged files found. with command "npx lint-staged"
- Hard to understand stashing behavior HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lint-staged.