Skip to content

Commit

Permalink
fix lint and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbsgilbs committed Dec 30, 2023
1 parent 59fd6fb commit 866d257
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/extractors/getFixedTFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function extractGetFixedTFunction(
const keyPrefixArgument = path.get('arguments')[2];
const keyPrefix: string | null = getFirstOrNull(
evaluateIfConfident(keyPrefixArgument),
)
);

let keys = Array<ExtractedKey>();
for (const reference of tBinding.referencePaths) {
Expand Down
1 change: 1 addition & 0 deletions src/extractors/transComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function parseTransComponentOptions(
const res: ExtractedKey['parsedOptions'] = {
contexts: false,
hasCount: false,
keyPrefix: null,
ns: null,
defaultValue: null,
};
Expand Down
4 changes: 2 additions & 2 deletions src/extractors/useTranslationHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ export default function extractUseTranslationHook(
let keyPrefix: string | null = null;

const optionsArgument = path.get('arguments')[1];
const options = getFirstOrNull(evaluateIfConfident(optionsArgument))
const options = getFirstOrNull(evaluateIfConfident(optionsArgument));

if (options) {
keyPrefix = options.keyPrefix || keyPrefix
keyPrefix = options.keyPrefix || keyPrefix;
}

let keys = Array<ExtractedKey>();
Expand Down
1 change: 1 addition & 0 deletions tests/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function createTranslationKey(
parsedOptions: {
contexts: false,
hasCount: false,
keyPrefix: null,
ns: null,
defaultValue: null,
},
Expand Down

0 comments on commit 866d257

Please sign in to comment.