Skip to content

Commit

Permalink
🚨 ci: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 25, 2023
1 parent dad7c64 commit c2e20a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ const config = require('@lobehub/lint').eslint;

module.exports = {
...config,
globals: {
HeadersInit: false,
},
rules: {
...config.rules,
'unicorn/prefer-string-replace-all': 0,
Expand Down
10 changes: 4 additions & 6 deletions src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ export const getPluginSettingsStringFromRequest = <T = any>(req: Request): T | u
export const createHeadersWithPluginSettings = (
settings: any,
header?: HeadersInit,
): HeadersInit => {
return {
...header,
[LOBE_PLUGIN_SETTINGS]: typeof settings === 'string' ? settings : JSON.stringify(settings),
};
};
): HeadersInit => ({
...header,
[LOBE_PLUGIN_SETTINGS]: typeof settings === 'string' ? settings : JSON.stringify(settings),
});

0 comments on commit c2e20a1

Please sign in to comment.