111 questions
0 votes
0 answers
34 views
Extend lintstaged config in NX monorepo
I have an Nx monorepo and an api application (Nest.js). I've created a base lintstaged.config.js in the root directory and want to extend it in every application. When I try to commit, I get the error ...
1 vote
0 answers
193 views
Git hook using lint-staged is very slow
I created an empty git project and then added a git hook to auto-format my code using prettier when code is commited. I followed the prettier docs and the hook works, however it's very slow. Taking ...
0 votes
1 answer
227 views
lint-staged is linting more than just staged files
THE PROBLEM I have two JavaScript files in packageA that I know have lint errors. I fixed and staged one. When I try to commit the staged file, it fails because of the unfixed/unstaged file. SETUP I ...
0 votes
0 answers
329 views
How to solve "Failed to get staged files!" with lint-staged?
In my vue3 project, I want to use lint-staged to run prettiert before committing. However, it fails to get commited files; here the console output for npx lint-staged --debug: >>> npx lint-...
1 vote
1 answer
580 views
Husky (v8) - multiple issues with setting up pre-commit (error: cannot spawn and no pre-commit file created)
On a new project, I run: npm install --save-dev husky Then: npx husky init Expected outcome (as per docs @ https://typicode.github.io/husky/get-started.html) "The init command simplifies ...
0 votes
1 answer
149 views
How to properly setup prettier with husky and lint-staged in vue2 project?
In my Vue project, I want to run prettier on my staged files before each commit. To do this I Installed prettier, husky and lint-staged and initialized husky with npx husky-init. Added the following ...
1 vote
1 answer
3k views
How to properly configure a lint-staged.config.js to provide config data to lint-stage
Context: I don't have much experience working with precommit hooks. Ive got this project boilerplate in vercell boilerplate list page, but it was a bit outdated, and I had to update dependencies and ...
2 votes
0 answers
2k views
Linting, Formatting in an Nx Monorepo with Husky
I have an nx monorepo with the following structure apps/ libs/ - angular/ - react/ - vue/ .. package.json What is the best way to configure ESLint and Prettier for all sub-projects (angular, ...
2 votes
0 answers
260 views
Lint-Staged configuration issues an error in a JavaScript monorepo environment
I'm encountering a problem while configuring lint-staged in my monorepo, which contains both web and mobile applications. The issue arises when I stage a single file from the apps/web directory and ...
0 votes
0 answers
74 views
What are the possible causes of Lint-staged Chinese garbled characters in Windows shell?
environment:windows10 node v20.10.0 description:If you run lint-staged without global installation of prettiered, an error message is reported and the output error message from the console is garbled ...
0 votes
2 answers
289 views
Lintstaged process is stuck when running rubocop command
I try to lint my .rb files while committing. Here is my .lintstagedrc file: { "*.rb": [ "bundle exec rubocop --require rubocop-airbnb", ] } Lint-staged is setup with ...
0 votes
1 answer
135 views
How to restore changed file in to git workspace when lint-staged lint error?
I use git add . and git commit -m "test", but there are some error when eslint --fix,How to I can take the changed filed from stash area into workspace? Thank you for your help // package....
3 votes
0 answers
870 views
Lint-staged + vitest - running related tests as precommit hook takes too much time
My configuration in package.json looks like this. I have two projects (one in app directory, another in backoffice directory) "scripts": { "start": "cd app && ...
2 votes
1 answer
2k views
Husky pre-commit hook not running
I have a git directory "root" in which there are two folders: "frontend" and "backend". The .git folder is in "root". I am trying to setup husky and lint-staged ...
4 votes
3 answers
9k views
Husky pre-commit hook not ignoring node_modules
I recently updated the dependencies on my React Native project, and we have husky pre-coomit hooks set up. I tried committing now and I get the following error: myname@MacSelf014 my-project % git ...