Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Oct 9, 2023
1 parent c0318a8 commit da7a18f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/search/src/lib/util/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* // output: 'Hello world !'
*/
export function removeNewlines(s: string = ''): string {
return s.replace(/[\n\r]+/g, ' ');
return s.replaceAll(/[\n\r]+/g, ' ');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/search/test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function config() {
try {
// Check if .env file exists
await fs.access(ENV_PATH);
} catch (e) {
} catch {
throw new Error(`.env file not found at ${ENV_PATH}: required to update snapshots`);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/search/test/lib/langchain/csv-lookup-tool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ t.test('CsvLookupTool', async (t) => {
3,Bob Smith,40`;

// Mock readFile function
const readFile = async (filename: string) => csv;
const readFile = async (_filename: string) => csv;
const { CsvLookupTool } = await t.mockImport('../../../src/lib/langchain/csv-lookup-tool.js', {
'node:fs/promises': { readFile },
});
Expand Down
1 change: 1 addition & 0 deletions packages/search/test/lib/util/string.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ t.test('removeNewlines', (t) => {
t.test('parseBoolean', (t) => {
t.equal(parseBoolean('true'), true);
t.equal(parseBoolean('false'), false);
// eslint-disable-next-line unicorn/no-useless-undefined
t.equal(parseBoolean(undefined), false);
t.equal(parseBoolean(true), true);
t.equal(parseBoolean(false), false);
Expand Down

0 comments on commit da7a18f

Please sign in to comment.