Skip to content

Commit

Permalink
feat: added warnings to eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
React Alpha Mentor committed Dec 19, 2020
1 parent e9245f7 commit 422c893
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-namespace': 'off',
'no-new-wrappers': 'off',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'no-invalid-this': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'no-invalid-this': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/objectSorter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function objectSorter(
const objectName =
typeof obj.toString === 'function' ? obj.toString() : 'unknown';

return '<:' + constructorName + '>:' + objectName;
return `<:${constructorName}>:${objectName}`;
},
};

Expand Down
6 changes: 3 additions & 3 deletions src/stringifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function _numberCoerce(obj: number): string {
* @return object string representation
*/
export function _number(obj: number): string {
return PREFIX.number + ':' + obj;
return `${PREFIX.number}:${obj}`;
}
/**
* Converts boolean to string
Expand Down Expand Up @@ -276,7 +276,7 @@ export function _setSortCoerce(obj: Set<any>): string {
* @return object string representation
*/
export function _setSort(obj: Set<any>): string {
return PREFIX.set + ':' + _arraySort.call(this, Array.from(obj));
return `${PREFIX.set}:${_arraySort.call(this, Array.from(obj))}`;
}
/**
* Converts set to string
Expand All @@ -285,7 +285,7 @@ export function _setSort(obj: Set<any>): string {
* @return object string representation
*/
export function _set(obj: Set<any>): string {
return PREFIX.set + ':' + _array.call(this, Array.from(obj));
return `${PREFIX.set}:${_array.call(this, Array.from(obj))}`;
}
/**
* Converts set to string
Expand Down

0 comments on commit 422c893

Please sign in to comment.