Skip to content

Commit

Permalink
chore(lint): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sneko committed May 13, 2022
1 parent 125fd07 commit 4c36984
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ module.exports = {
'@typescript-eslint/no-use-before-define': 'off',
quotes: ['warn', 'single', { avoidEscape: true }],
'node/no-unpublished-import': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
},
};
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class UtmSynapse {
// In case the storage is missing, log this plugin won't work normally
if (typeof Storage === 'undefined') {
console.warn(
`Using the UTM package without having a storage won't work properly`
"Using the UTM package without having a storage won't work properly"
);

this.storage = new MemoryStorage();
Expand Down Expand Up @@ -61,7 +61,7 @@ export class UtmSynapse {
}

/** Save UTM parameters for later usage */
public save(params: UtmParams) {
public save(params: UtmParams): void {
if (!this.storage) {
return;
}
Expand Down Expand Up @@ -111,7 +111,7 @@ export class UtmSynapse {

const utmParams = this.storage.getItem(UtmSynapse.StorageKey);

return utmParams ? JSON.parse(utmParams) : null;
return utmParams ? (JSON.parse(utmParams) as UtmParams) : null;
}

/** Clear the storage of any UTM parameter */
Expand Down Expand Up @@ -146,7 +146,7 @@ export class UtmSynapse {
* Tip: you should save parameters before doing this (because they would be lost otherwise)
* Note: if the history browser feature is not accessible it won't work
*/
public cleanDisplayedUrl() {
public cleanDisplayedUrl(): void {
if (!window || !history) {
return;
}
Expand Down

0 comments on commit 4c36984

Please sign in to comment.