Skip to content

Commit

Permalink
chore(infra/biome): enable noParameterAssign
Browse files Browse the repository at this point in the history
  • Loading branch information
shulaoda committed Aug 3, 2024
1 parent 4e666c2 commit 58ee67a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
3 changes: 1 addition & 2 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"noVoidTypeReturn": "off"
},
"style": {
"noParameterAssign": "off",
"noNonNullAssertion": "off"
},
"performance": {
Expand Down Expand Up @@ -88,4 +87,4 @@
"clientKind": "git",
"useIgnoreFile": true
}
}
}
12 changes: 3 additions & 9 deletions packages/rspack-lite-tapable/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,9 @@ export class HookBase<T, R, AdditionalOptions = UnsetAdditionalOptions>
_runRegisterInterceptors(
options: FullTap & IfSet<AdditionalOptions>
): FullTap & IfSet<AdditionalOptions> {
for (const interceptor of this.interceptors) {
if (interceptor.register) {
const newOptions = interceptor.register(options);
if (newOptions !== undefined) {
options = newOptions;
}
}
}
return options;
return this.interceptors.reduce((options, interceptor) => {
return interceptor.register?.(options) || options;
}, options);
}

_runCallInterceptors(...args: any[]) {
Expand Down

0 comments on commit 58ee67a

Please sign in to comment.