Skip to content

Commit

Permalink
chore: enable throw-literal
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Mar 3, 2024
1 parent 429d01d commit f0ccdec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ module.exports = defineConfig({
// TODO @Shinigami92 2024-02-29: Remove these later
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-var-requires': 'off',
Expand Down
11 changes: 5 additions & 6 deletions test/migrations/081_temporary_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ exports.up = (pgm) => {

exports.down = async (pgm) => {
await pgm.db.query('SAVEPOINT sp_temp_table;');

try {
await pgm.db.query('DROP TABLE "tmp"');
throw 1;
} catch (err) {
if (err === 1) {
throw new Error('Missing TEMPORARY clause');
}

} catch {
await pgm.db.query('ROLLBACK TO SAVEPOINT sp_temp_table;');
return;
}

throw new Error('Missing TEMPORARY clause');
};

0 comments on commit f0ccdec

Please sign in to comment.