Skip to content

espree.parse mutates options argument #329

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

Closed
not-an-aardvark opened this issue Apr 1, 2017 · 0 comments
Closed

espree.parse mutates options argument #329

not-an-aardvark opened this issue Apr 1, 2017 · 0 comments

Comments

@not-an-aardvark
Copy link
Member

not-an-aardvark commented Apr 1, 2017

Using espree 3.4.1:

const options = { ecmaFeatures: {} }

require('espree').parse('foo', options);

console.log(options.ecmaFeatures);

Expected behavior: options.ecmaFeatures should still be an empty object.

Actual behavior: options.ecmaFeatures is { impliedStrict: false }

This issue came up when I was looking into freezing the default config object for eslint.

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

No branches or pull requests

1 participant