ember-cli / eslint-plugin-ember

An ESLint plugin that provides set of rules for Ember applications based on commonly known good practices.
MIT License
257 stars 198 forks source link

Fix API deprecations blocking eslint v9 compatibility #2153

Closed LucasHill closed 5 days ago

LucasHill commented 5 days ago

There are a couple deprecations in eslint that are preventing this plugin from working under v9. As this addon already supports the flat config format, I believe these should be the only changes needed to work under v9.

currentSegments deprecation: https://github.com/eslint/eslint/issues/17457 'context.getAncestors` deprecation: https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getancestors()

This was my reference for how to fix this rule: https://github.com/eslint/eslint/blob/main/lib/rules/getter-return.js

LucasHill commented 5 days ago

I may have been a little too confident. I'm finding a few more deprecations. What the current work does do is unblock using the eslint/compat tool for this plugin to work under v9. I'll see how extensive the remaining issues are, but this is mergeable as is or I can try to fix the rest.

NullVoxPopuli commented 5 days ago

thank you!