New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not all lintstagedrc.json files are found in the rush.js monorepo #1375
Comments
In your debug logs there are no staged files, so can't really tell anything further... Does it work as expected if you only have a single lint-staged config file? |
Also, this file contains all the valid config filenames: https://github.com/lint-staged/lint-staged/blob/master/lib/configFiles.js |
Hi @iiroj, Yes, that's what I wrote in my description. I probably should have worded the headline better.
I suspect that since the actual lint-staged process in the rush project structure is called in |
In this case, lint-staged exists early without even getting to the configuration file loading part. Here's the relevant snip from your log:
|
Description
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 malformed code is committed.
I assume that the child configuration files are not taken into account because the following echo commands do not appear on the console. The echo string appears in the configuration file in the root directory. I suspect this is also because the message No staged files found. appears.
Steps to reproduce
I have a monorepo with rush.js that has a
/frontend
and a/backend
repository under theapps/
directory. These two repos are integrated as git submodules in the monorepo.lint-staged is implemented in an autoinstaller package under
common/autoinstallers/rush-lint-staged
and is executed via the rush command rush lint-staged-apps.According to the faqs for monorepos, I have stored the first (nearest)
lintstagedrc.json
in the root directory, the secondlintstagedrc.json
in/apps/frontend
and also in/apps/backend
.lintstagedrc.json (root)
lintstagedrc.json (frontend and backend)
The
eslintrc.json
and.eslintignore
files are available in the submodules. If I execute the eslint command on the console, I get the expected behavior.I have already tested with all configurations in lint-staged and different patterns (micromatch), but I am not able to create the expected setup.
What else do I need to consider in my setup? Are there currently known problems that I have not yet recognized?
Debug Logs
expand to view
Environment
lint-staged
: 15.2.0The text was updated successfully, but these errors were encountered: