Skip to content

Commit

Permalink
Add eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
hwhmeikle committed May 23, 2022
1 parent cb00edb commit 69d056a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2021
},
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"typecheck": "tsc",
"clean": "rm -rf ./dist",
"lint": "eslint \"{cli,config,src,test}/**/*.ts\"",
"build": "rollup --configPlugin rollup-plugin-ts --config rollup.config.ts"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions src/Authsignal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class AuthsignalClient {
};
}

private sendJson(path: string, payload: any) {
private sendJson(path: string, payload: unknown) {
const jsonString = JSON.stringify(payload);
const url = `${this.trackingHost}/api/v1/client/${path}?publishableKey=${this.publishableKey}`;

Expand All @@ -146,7 +146,7 @@ export class AuthsignalClient {
private xmlHttpReqTransport(url: string, json: string): Promise<void> {
const req = new XMLHttpRequest();
return new Promise((resolve, reject) => {
req.onerror = (e) => {
req.onerror = () => {
reject(new Error(`Failed to send JSON. See console logs`));
};
req.onload = () => {
Expand Down

0 comments on commit 69d056a

Please sign in to comment.