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
The rule suggests (or auto-fixes) to change the order of the inject array, but it does not change the order of the useFactory arguments which need to be in the same order.
@Module({
providers: [
{
provide: 'EXAMPLE_PROVIDER',
useFactory: (bProvider: BProvider, aProvider: AProvider): unknown => {
return new WhatEver();
},
// autofix would swap the order here but leave the useFactory above as is, which silently breaks code
inject: [BProvider, AProvider],
}
]
})
The text was updated successfully, but these errors were encountered:
The sort-module-metadata-arrays rule break the factory provider injection.
The rule suggests (or auto-fixes) to change the order of the
inject
array, but it does not change the order of theuseFactory
arguments which need to be in the same order.The text was updated successfully, but these errors were encountered: