Skip to content

Commit

Permalink
Turn on @typescript-eslint/no-unused-var. (#318)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Jun 5, 2024
1 parent b9db1cf commit 6711e8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default [
}
],
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'array-callback-return': 'off',
'new-cap': 'off',
'no-return-assign': 'error',
Expand Down
4 changes: 2 additions & 2 deletions tools/src/merger/GlobalParamsGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default class GlobalParamsGenerator {
spec.components.parameters = { ...this.global_params, ...spec.components.parameters }

const global_param_refs = Object.keys(this.global_params).map(param => ({ $ref: `#/components/parameters/${param}` }))
Object.entries(spec.paths as Document).forEach(([path, path_item]) => {
Object.entries(path_item as Document).forEach(([method, operation]) => {
Object.entries(spec.paths as Document).forEach(([_path, path_item]) => {
Object.entries(path_item as Document).forEach(([_method, operation]) => {
const params = operation.parameters ?? []
operation.parameters = [...params, ...Object.values(global_param_refs)]
})
Expand Down

0 comments on commit 6711e8f

Please sign in to comment.