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

Build broken on master after espree upgrade #11014

not-an-aardvark opened this issue Oct 24, 2018 · 1 comment


Copy link

commented Oct 24, 2018

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

npm test

What did you expect to happen?

The build should pass.

What actually happened? Please include the actual, raw output from ESLint.

The build did not pass. The following output was produced during the gensite tests:

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
    "message": "SyntaxError: Expected an identifier but found '{' instead\nat build/eslint.js:7581:0",
    "str": "SyntaxError: Expected an identifier but found '{' instead\nat build/eslint.js:7581:0"

Finished in 0.174 secs / 0 secs @ 16:47:26 GMT-0400 (Eastern Daylight Time)

✔ 0 tests completed
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
    "message": "TypeError: undefined is not a constructor (evaluating 'new Linter()')\nat tests/lib/linter.js:2534:28",
    "str": "TypeError: undefined is not a constructor (evaluating 'new Linter()')\nat tests/lib/linter.js:2534:28"

✖ Error while running the tests! Exit code: 1

I haven't investigated the problem yet, but I found that downgrading espree back to 4.0.0 made the problem go away. At first glance, it seems like the generated browser version of Linter has a syntax error (or ES6 syntax).


This comment has been minimized.

Copy link
Member Author

commented Oct 24, 2018

The problem might be that eslint/espree@8eadb88 added ES6 syntax to espree for the first time, and we're not compiling code in dependencies down to ES5. As far as semver is concerned, this is valid since espree supports Node >=6.0.0, but if this is the cause of the issue we might need to adjust our build process so that we also compile dependencies.

edit: I've confirmed that this is the issue. The syntax error is occurring on this line from the new version of acorn-jsx.

not-an-aardvark added a commit that referenced this issue Oct 24, 2018

Build: compile espree's deps to ES5 when generating site (fixes #11014)
Previously, the build process would compile ESLint's dependencies to ES5 when generating a website bundle, but not espree's dependencies. Now that espree has dependencies with ES6 code, it's necessary to also compile espree's dependencies.

@eslint eslint bot locked and limited conversation to collaborators Apr 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
1 participant
You can’t perform that action at this time.