Doesn't seem to work with eslint 6.8+ - Cannot set property 'jsx' of undefined
MattCCC opened this issue · 1 comments
MattCCC commented
Hi,
I'm getting this error when using together with following packages:
"eslint": "6.8.0",
"eslint-import-resolver-typescript": "2.3.0",
"eslint-plugin-extra-rules": "0.0.0-development",
"eslint-plugin-vue": "7.1.0",
Error:
[Error - 11:50:37 AM] ESLint stack trace:
[Error - 11:50:37 AM] TypeError: Failed to load plugin 'extra-rules' declared in '--config': Cannot set property 'jsx' of undefined
at module.exports (/Development/node_modules/acorn-jsx/inject.js:359:21)
at Object.<anonymous> (/Development/node_modules/eslint-plugin-extra-rules/node_modules/espree/espree.js:69:13)
at Module._compile (internal/modules/cjs/loader.js:1014:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1051:10)
at Module.load (internal/modules/cjs/loader.js:862:32)
at Module._load (internal/modules/cjs/loader.js:774:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:899:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Development/node_modules/eslint-plugin-extra-rules/no-commented-out-code.js:1:14)
[Error - 11:53:06 AM] ESLint stack trace:
[Error - 11:53:06 AM] TypeError: Failed to load plugin 'extra-rules' declared in '--config': Cannot set property 'jsx' of undefined
at module.exports (/Development/node_modules/acorn-jsx/inject.js:359:21)
at Object.<anonymous> (/Development/node_modules/eslint-plugin-extra-rules/node_modules/espree/espree.js:69:13)
at Module._compile (internal/modules/cjs/loader.js:1014:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1051:10)
at Module.load (internal/modules/cjs/loader.js:862:32)
at Module._load (internal/modules/cjs/loader.js:774:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:899:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Development/node_modules/eslint-plugin-extra-rules/no-commented-out-code.js:1:14)
An ideas on how to resolve it or shim it at very least? Thank you in advance for any suggestions.
MattCCC commented
Took some time but bumping acorn-jsx to 5.3.1 solves the case of accessing the plugins object. Hope it helps to whoever faces the issue