context.getScope() is deprecated and has been removed in ESLint v9.0.0.
We have introduced a new SourceCode#getScope(node) method that requires you to pass in the reference node. This method was added in ESLint v8.37.0 so it has already been in place for the last six months. For best compatibility, you can check for the presence of this new method to determine which one to use:
This adds compatibility with ESLint 9.
See: https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/#context.getscope()