upleveled / eslint-plugin-upleveled

https://www.npmjs.com/package/eslint-plugin-upleveled
13 stars 0 forks source link

Convert to ESLint 8 New Flat Config, Support for ESLint 9 #117

Open karlhorky opened 1 year ago

karlhorky commented 1 year ago

ESLint 8 has a new "flat" configuration format:

https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new

Currently with ESLint 9, using eslint-plugin-upleveled results in the following error:

ESLint: 9.3.0

TypeError: context.getScope is not a function
Occurred while linting ...
Rule: "upleveled/no-submit-handler-without-preventDefault"

Seems like eslint-plugin-react merged and released a PR adding compatibility for the new Flat Config format here, which could prove to be a helpful guide how we can implement here too:

Once we have support in this plugin, then we can also switch to the new Flat Config in @upleveled/eslint-config-upleveled: https://github.com/upleveled/eslint-config-upleveled/issues/160

karlhorky commented 6 months ago

Worked around this temporarily in: