-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Project ... does not exist #951
Comments
I have the same issue. |
As your error is coming from one of your scripts, I’m not sure if it’s related to lint-staged.
|
@okonet You're possibly right, running
It may well be a @wadeV12 Do you get the same error using |
I have the same issue, anyone figure out a solution? |
@gleisonkz I tried two (well one that actually uses I didn't get anything working the |
Also I noticed you’re having |
@okonet Good point, it only mentions files that were actually staged so I would think it's not that 🤔. |
I tried to use this setup but lint-staged is not getting triggered when I commit. Unfortunately, The only way I get it working was by linting all files. |
@gleisonkz Were you running on the same versions and using |
So I have absolutely the same issue as @Berkmann18 (on macos 11.2.3). for linting only it seems... this version executes ng lint and errors
the error:
this version doesn't execute ng lint - [SKIPPED] No staged files match *{.ts}
Funny enough if I have EDIT: check #951 (comment) |
@jose-barata I believe
EDIT: I opened an issue regarding this, lets see: micromatch/braces#32 |
It seems that lint-staged doesn't play very well with angular and ng lint (I think that's the specific and underlying issue). Might help some people (I took ideas out of it) - #547 As for me I'm using as of time of writting (if it matters): In my particular case, I migrated to eslint (since tslint was deprecated). So I thought about running eslint directly instead of running I managed to fix all issues with: My husky pre-commit command lint-staged.config.js
Note: I have a monorepo structure with 'src' and 'projects' folders both with their own eslint rules |
@Berkmann18 and others who see "Project ... does not exist" with angular:
Please note: This will probably only fix the "Project... does not exist" error, afterwards there are probably some more angular specific issues to consider, see @jose-barata 's comment and #547 |
@musicEnfanthen this seems like a good example to add to the readme! Could you open a PR, or provide an example config on how to use |
I think |
@iiroj Since this is quite specific to angular syntax, I am not sure if @okonet would like to see this included in the README of lint-staged. For example configs, please have a look at @jose-barata 's comment above and at different workarounds proposed in #547. (As @okonet pointed out, at the moment there is no real benefit of using |
Works for me. It just seems to be a common issue, so maybe the README could state in the FAQ section that |
Any update on this? Is it possible to use |
PR are welcome! Let's add a section to the FAQ that says For now I'll close this ticket. |
See PR #1113 |
Is it working now?. I am having the lint-staged@12.6.7 but facing the same error |
Same here |
It is possible but only if you use https://www.npmjs.com/package/ng-lint-staged |
@michahell I follow the steps in https://www.npmjs.com/package/ng-lint-staged but also doesn't work. |
Can you provide sample code to re create the issue? |
I tried to use like following code which has worked.
|
@thengstermanndev But this way you will lint whole project instead of only staged files. |
Description
Steps to reproduce
npm i -D husky prettier lint-staged
npx husky install
package.json
An unhandled exception occurred: Project '/home/maxie/Projects/ng-git-hooks/src/app/app.component.ts' does not exist.
.Here's a repo where I tried to get hooks to work (note the branch): https://github.com/Berkmann18/ng-git-hooks/tree/husky-ls
Debug Logs
expand to view
Environment
lint-staged
: 10.5.4The text was updated successfully, but these errors were encountered: