-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
SyntaxError: Unexpected token } in JSON at position 199 at JSON.parse() #1274
Comments
I am seeing a similar error when trying to commit from VSCode, which worked until I updated VSCode recently (current VSCode version info below). As of the latest VSCode version I can no longer commit from the VSCode interface, I get the following error. I can commit from the command line just fine, however.
If I downgrade |
Downgrading to 12.5.0 didn't resolve my issue, plus it doesn't let me commit whether it's through GitHub desktop or the CLI. Running |
Would version 13.2.1 work any better? |
Description
I'm using lint-staged 13.1.2 with husky version 8.0.0 and eslint 8.17.0. When trying to commit to my branch, I keep getting an error from the lint-staged node modules:
It seems to be referencing the loadConfig.js file's jsonParse() method. I see that there is a searchPlaces array in that file which I'm guessing could be related to the issue, but I don't see any errors with my package.json in terms of brackets, and I don't have another lint-staged config file. The debug logs seem to support the idea that the problem is with my package.json, but I don't even have a
loadConfig.js
package.json
Steps to reproduce
Make a commit with husky pre-commit hook.
Debug Logs
expand to view
Environment
lint-staged
: 13.1.2The text was updated successfully, but these errors were encountered: