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

Bug: Can't execute ember/no-implicit-injections rule #2239

Open
ram-139-ar opened this issue Jan 9, 2025 · 1 comment
Open

Bug: Can't execute ember/no-implicit-injections rule #2239

ram-139-ar opened this issue Jan 9, 2025 · 1 comment

Comments

@ram-139-ar
Copy link

Facing the below error while executing ember/no-implicit-injections

Actual code in route file : this.store.pushPayload({ 'data': JSON.parse(objects) });

And I assign this to the variable called (self) and use the same in the code self.store.unloadAll("modelName")

Oops! Something went wrong! :(

ESLint: 8.43.0

TypeError: Cannot read properties of undefined (reading '0')
Rule: "ember/no-implicit-injections"
at fixService (/node_modules/eslint-plugin-ember/lib/rules/no-implicit-injections.js:33:50)
at Object.fix (/node_modules/eslint-plugin-ember/lib/rules/no-implicit-injections.js:239:19)
at normalizeFixes (node_modules/eslint/lib/linter/report-translator.js:178:28)
at /Users/ramar-9623/Desktop/Workdrive Development/zd-client/jsapps/node_modules/eslint/lib/linter/report-translator.js:349:49
at Object.report (/node_modules/eslint/lib/linter/linter.js:1021:41)
at MemberExpression (/node_modules/eslint-plugin-ember/lib/rules/no-implicit-injections.js:220:21)
at ruleErrorHandler (/node_modules/eslint/lib/linter/linter.js:1050:28)
at (/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach ()
at Object.emit (/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@NullVoxPopuli
Copy link
Contributor

Can you provide a reproduction? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants