FS#60128 - [eslint] Acorn 6.0.1 breaks eslint
Attached to Project:
Community Packages
Opened by Cookie Engineer (cookiengineer) - Wednesday, 19 September 2018, 18:31 GMT
Last edited by Felix Yan (felixonmars) - Saturday, 22 September 2018, 06:50 GMT
Opened by Cookie Engineer (cookiengineer) - Wednesday, 19 September 2018, 18:31 GMT
Last edited by Felix Yan (felixonmars) - Saturday, 22 September 2018, 06:50 GMT
|
Details
Description:
If you install eslint (5.6.0) in combination with the current acorn package (6.0.1-1), it will break. Acorn seemingly had a breaking change and the `acorn.plugins` property is not available anymore. ESLint and other downstream dependencies actually expect that (not only eslint). A quick fix is to modify the eslint/node_modules/acorn-jsx/inject.js and insert something like `acorn.plugins = acorn.plugins || {}` before the `acorn.plugins.jsx = ` assignment, but I guess there should be a better fix for that. Additional info: * eslint 5.6.0 and -git * acorn 6.0.1 (compared with working acorn 5.7.2) * I am not sure whether or not this is an issue with acorn itself, the maintainer decided to re-structure the repository so I cannot make a simple diff anymore :-/ Steps to reproduce: - Install `eslint` package. - Execute `node` binary - Execute `require('eslint')` in REPL, this will show the error and lines Output is attached as node_output.sh here. |
This task depends upon
Comment by
Felix Yan (felixonmars) - Saturday,
22 September 2018, 06:50 GMT
Reverted acorn to 5.7.3 for now. I'll reconsider the dedup part.