Questions tagged [lint-staged]
Tool to run linters against staged git files
lint-staged
111
questions
0
votes
0
answers
22
views
Error loading rule @typescript-eslint/no-implied-eval lint-staged eslint --fix
I can not run eslint --fix with lint-staged
I'm trying to implement lint-staged husky. I already installed husky, lint-staged and relate packges.
"scripts": {
"dev": "...
0
votes
0
answers
63
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 ...
0
votes
0
answers
23
views
lint-stage config for multi nested folder
My psudo folder structure.
/
/Dir1/CsFiles/A.cs
/Dir2/SomeFunc/B.cs
/Dir3/Controllers/Web.cs
/Dir3/ClientApp/lint-stage.config.cjs
my lint-stage config
module.exports = {
'../../**/*.cs': (...
2
votes
0
answers
520
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
133
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
47
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
151
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
0
answers
158
views
Not all lintstagedrc.json files are found in the rush.js monorepo
Expected and behavior
In a rush.js monorepo, I expect lint-staged to report problems that eslint . --fix cannot solve independently and aborts the commit.
Currently all commits go through and ...
0
votes
0
answers
126
views
How to ignore a folder in lint-staged?
I have this configuration file for lint-staged:
{
"*.{ts,tsx}": ["eslint --fix"],
"*.css": "stylelint --fix"
}
However, I want to skip/ignore the coverage ...
0
votes
1
answer
63
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....
1
vote
0
answers
382
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 && ...
1
vote
1
answer
1k
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 ...
2
votes
3
answers
5k
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 ...
0
votes
0
answers
62
views
Is it possible to lint only modified part(s) of staged files with the use of lint-staged?
Imagine a source file containing 1000 lines of code (yep, that isn't good, I know).
When you do a slight modification in that file you want your lint-staged pre-commit hook to analyze and report ...
1
vote
3
answers
935
views
Explicitly specified file was ignored due to negative glob patterns in lint stage
When tried to commit nextjs with nextauth, lint stage failed due to this error,
Explicitly specified file was ignored due to negative glob patterns: "c:/projects/project01/app/api/auth/[......