You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When manually configuring the plugin, i get an error after running npx eslint.
importeslintfrom'@eslint/js';importtseslintfrom'typescript-eslint';// this import is causing the errorimporttypeormTypescriptPluginfrom'eslint-plugin-typeorm-typescript';exportdefaulttseslint.config(eslint.configs.recommended,
...tseslint.configs.recommended,{plugins: {'typeorm-typescript': typeormTypescriptPlugin},rules: {"typeorm-typescript/enforce-column-types": "error","typeorm-typescript/enforce-relation-types": "warn","typeorm-typescript/enforce-consistent-nullability": ["error",{"specifyNullable": "always"}]}});
Error:
Oops! Something went wrong! :(
ESLint: 9.16.0
ReferenceError: Cannot access 'plugin' before initialization
at file:///Users/******/app/node_modules/eslint-plugin-typeorm-typescript/es/recommended.js:4:31
Thanks for your issue, it is absolutely correct, there was a circular dependency between the main plugin and recommended exports, which made ES Modules break. I already planned a release (v0.5.0), and I added a fix which should solve this issue, as well as an example which tests if the customization breaks. Feel free to test with the new version, and reopen if you still have problems.
When manually configuring the plugin, i get an error after running npx eslint.
Error:
But this works:
The text was updated successfully, but these errors were encountered: