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

Cannot handle "SpreadElement" ? #1154

Open
SandZn opened this issue Jul 27, 2022 · 2 comments
Open

Cannot handle "SpreadElement" ? #1154

SandZn opened this issue Jul 27, 2022 · 2 comments
Labels

Comments

@SandZn
Copy link

SandZn commented Jul 27, 2022

I tried to identify this snippet of code but failed:

function readPackageUpSync(options) {
	const filePath = findUp.sync('package.json', options);
	if (!filePath) {
		return;
	}

	return {
		packageJson: readPackageSync({...options, cwd: path.dirname(filePath)}),
		path: filePath
	};
}

It reported "Unexpected token ..."

@conartist6
Copy link
Contributor

You're using the default parser, esprima, which doesn't support object spreads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants