Skip to content

Commit

Permalink
chore: enable prefer-includes (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Mar 1, 2024
1 parent f3b4fbb commit a682244
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ module.exports = defineConfig({
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ const getMigrationsToRun = (

const upMigrations = migrations.filter(
({ name }) =>
runNames.indexOf(name) < 0 && (!options.file || options.file === name)
!runNames.includes(name) && (!options.file || options.file === name)
);
const { count = Infinity } = options;
return options.timestamp
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const escapeValue = (val: Value): string | number => {
do {
index = ids.next();
dollars = `$pg${index}$`;
} while (val.indexOf(dollars) >= 0);
} while (val.includes(dollars));

return `${dollars}${val}${dollars}`;
}
Expand Down

0 comments on commit a682244

Please sign in to comment.