Skip to content
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 end of JSON input #274

Closed
sgurin opened this issue Jan 25, 2022 · 5 comments
Closed

SyntaxError: Unexpected end of JSON input #274

sgurin opened this issue Jan 25, 2022 · 5 comments

Comments

@sgurin
Copy link

sgurin commented Jan 25, 2022

Hi. Found missed close brasket in app/node_modules/resolve/test/resolver/malformed_package_json/package.json

Please take a look

image

@ljharb
Copy link
Member

ljharb commented Jan 25, 2022

Look at the file name. It's not missing, it's intentionally there.

Where are you getting this syntax error from? This file is a test fixture.

@sgurin
Copy link
Author

sgurin commented Jan 25, 2022

Okay, add the whole directory in ignore for typescript checker. Now it warning
image

@ljharb
Copy link
Member

ljharb commented Jan 25, 2022

Why is typescript checking node_modules at all?

@sgurin
Copy link
Author

sgurin commented Jan 25, 2022

Good question :) The same is why open bracket doing in package.json even for test :)

@ljharb
Copy link
Member

ljharb commented Jan 25, 2022

Because resolve needs to test how it behaves when a dependency has a malformed package.json. It makes perfect sense for this package.

Typescript is a linter, like eslint. You should only be linting your own code, which doesn't include anything in node_modules.

Sounds like if you fix your TS settings it'll be resolved, so I'll close this.

(#271 is related; another tool improperly scanning things in node_modules)

@ljharb ljharb closed this as completed Jan 25, 2022
ljharb added a commit that referenced this issue Oct 10, 2023
…d security scanners

Fixes #294.
Fixes #274.
Fixes #271.
Fixes #266.
Fixes #265.
Fixes #262.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants