Skip to content

Commit

Permalink
chore: update eslint rules
Browse files Browse the repository at this point in the history
Signed-off-by: Timur Bolotov <[email protected]>
  • Loading branch information
timursaurus committed Mar 26, 2023
1 parent 6a209e7 commit 89939a1
Show file tree
Hide file tree
Showing 9 changed files with 262 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dist
coverage
.profile
.idea
.eslintcache
.eslintcache
playground
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"extends": [
"prettier",
"standard",
"plugin:unicorn/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:import/errors",
Expand Down Expand Up @@ -46,6 +47,8 @@
"comma-style": 0,

// Disable some unnecessary or conflicting rules
"unicorn/prefer-ternary": 0,
"unicorn/no-null": 0,
"no-use-before-define": "off",
"unicorn/prevent-abbreviations": 0,
"unicorn/no-await-expression-member": 0,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^46.0.0",
"prettier": "^2.8.7",
"typescript": "^5.0.2",
"unbuild": "^1.1.2",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/transport/aws/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./AwsSigv4Signer";
export * from "./aws-sigv4-signer";
Empty file removed src/transport/aws/sigv4-signer.ts
Empty file.
1 change: 1 addition & 0 deletions src/transport/pool/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './base-connection-pool'
12 changes: 6 additions & 6 deletions src/transport/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export class Serializer {
let serialized: string;
try {
serialized = JSON.stringify(payload);
} catch (e) {
const error = e as Error;
throw new SerializationError(error.message, payload);
} catch (error) {
const err = error as Error;
throw new SerializationError(err.message, payload);
}
return serialized;
}
Expand All @@ -72,9 +72,9 @@ export class Serializer {
try {
// @ts-expect-error
output = sjson.parse(payload, this[kJsonOptions]);
} catch (e) {
const error = e as Error;
throw new DeserializationError(error.message, payload);
} catch (error) {
const err = error as Error;
throw new DeserializationError(err.message, payload);
}
return output;
}
Expand Down
Loading

0 comments on commit 89939a1

Please sign in to comment.