Skip to content

Commit

Permalink
fix: detect vscode config
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Feb 4, 2024
1 parent 3367032 commit c7069e8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 0 additions & 5 deletions TODO.md

This file was deleted.

1 change: 0 additions & 1 deletion playground/vscode-setting/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default defineConfig({
react(),
i18nDetector({
root: __dirname,
autoDetectI18nConfig: true,
}),
],
})
2 changes: 1 addition & 1 deletion src/plugin/utils/I18nAllyVscodeSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class I18nAllyVscodeSetting {

constructor(
private readonly _root: string,
private readonly _stopAt: string = _root,
private readonly _stopAt: string | undefined,
) {
debug('I18nAllyVscodeSetting - root:', _root)
debug('I18nAllyVscodeSetting - stopAt:', _stopAt)
Expand Down
5 changes: 4 additions & 1 deletion src/plugin/utils/init-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ function getDefaultOptions(options?: I18nDetectorOptions): I18nDetectorOptions {

export function initOptions(options?: I18nDetectorOptions) {
return {
...getDefaultOptions(options),
...getDefaultOptions({
...DEFAULT_OPTIONS,
...options,
}),
...options,
} as Required<I18nDetectorOptions>
}

0 comments on commit c7069e8

Please sign in to comment.