Error While Linting - new-module-imports
See original GitHub issueHey friends, I just updated to “^5.0.1” from “^4.6.1”
When linting I now get this error (causes Ember Build to also fail):
$ eslint app
Cannot read property 'forEach' of undefined
TypeError: Cannot read property 'forEach' of undefined
at VariableDeclarator (D:\Projects\myApp\node_modules\eslint-plugin-ember\lib\rules\new-module-imports.js:27:27)
at listeners.(anonymous function).forEach.listener (D:\Projects\myApp\node_modules\eslint\lib\util\safe-emitter.js:47:58)
at Array.forEach (native)
at Object.emit (D:\Projects\myApp\node_modules\eslint\lib\util\safe-emitter.js:47:38)
at NodeEventGenerator.applySelector (D:\Projects\myApp\node_modules\eslint\lib\util\node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (D:\Projects\myApp\node_modules\eslint\lib\util\node-event-generator.js:280:22)
at NodeEventGenerator.enterNode (D:\Projects\myApp\node_modules\eslint\lib\util\node-event-generator.js:294:14)
at CodePathAnalyzer.enterNode (D:\Projects\myApp\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:608:23)
at Traverser.enter (D:\Projects\myApp\node_modules\eslint\lib\linter.js:956:32)
at Traverser.__execute (D:\Projects\myApp\node_modules\estraverse\estraverse.js:397:31)
at Traverser.traverse (D:\Projects\myApp\node_modules\estraverse\estraverse.js:501:28)
Seems to fail here:
const properties = node.id.properties;
// Iterate through the destructured properties and report them
properties.forEach((item) => {
properties is undefined
When I set the rule to Off in eslintrc I get another error with require-super-in-init
"eslint": "v4.2.0"
"ember-cli": "2.12.2",
"ember-cli-eslint": "^4.2.2",
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
ESLint error when trying to lint Angular templates
I'm now trying to lint my component template files as well following this doc. Error while loading rule '@typescript-eslint/dot-notation': You ...
Read more >Linting | Linkfire Frontend Guidelines
eslint is used for JavaScript linting: https://eslint.org/ ... 'ember/alias-model-in-controller': 'error', 'ember/new-module-imports': 'error', ...
Read more >Use Lint code in Adobe Dreamweaver to detect errors
Learn how to lint HTML, CSS, and JS files in Adobe Dreamweaver. View the errors and warnings in the Output panel and jump...
Read more >Rules - ESLint - Pluggable JavaScript Linter
"error" or 2 - turn the rule on as an error (exit code is 1 when triggered). Using configuration comments. To configure rules...
Read more >How to Automate Code Linting in Next.js with ESLint & Husky ...
Linting is the practice of checking code through automated static analysis for syntax errors and optionally code style issues. It typically ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it was potentially caused by not ignoring the concat-stats-for directory. I’m not seeing the issue anymore. If it comes back, I will let you know.
In case it is helpful to others… I was seeing this same error and stack trace but it was because I needed to add
/electron-out/
to.eslintignore