You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eslint is throwing the following error on import.meta.url when the eslint-plugin-mocha plugin is loaded:
$ $(npm bin)/eslint minimal.js
Oops! Something went wrong! :(
ESLint: 7.6.0
TypeError: Cannot set property 'meta' of undefined
Occurred while linting /project/minimal.js:2
at MetaProperty (/project/node_modules/eslint-plugin-mocha/lib/rules/prefer-arrow-callback.js:234:27)
at /project/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/project/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/project/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
at NodeEventGenerator.applySelectors (/project/node_modules/eslint/lib/linter/node-event-generator.js:283:22)
at NodeEventGenerator.enterNode (/project/node_modules/eslint/lib/linter/node-event-generator.js:297:14)
at CodePathAnalyzer.enterNode (/project/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:673:23)
at (/project/node_modules/eslint/lib/linter/linter.js:949:32
at Array.forEach (<anonymous>)
I am using nodejs v14.7.0 on MacOS, eslint 7.6 and eslint-plugin-mocha 8.0, I have "type": "module" specified in my package.json
This is my .eslintrc.cjs, removing plugins: ['mocha'] and 'plugin:mocha/recommended' from extends causes eslint to parse the file correctly.
Eslint is throwing the following error on
import.meta.url
when the eslint-plugin-mocha plugin is loaded:I am using nodejs v14.7.0 on MacOS, eslint 7.6 and eslint-plugin-mocha 8.0, I have
"type": "module"
specified in my package.jsonThis is my .eslintrc.cjs, removing
plugins: ['mocha']
and'plugin:mocha/recommended'
fromextends
causes eslint to parse the file correctly.Minimal javascript file to reproduce the error:
The text was updated successfully, but these errors were encountered: