diff --git a/.eslintrc.json b/.eslintrc.json
index a151ffb..c24a018 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,23 +1,15 @@
{
- "extends": [
- "../../.eslintrc.json"
- ],
+ "extends": ["../../.eslintrc.json"],
"env": {
"browser": true,
"node": true
},
- "ignorePatterns": [
- "!**/*"
- ],
+ "ignorePatterns": ["!**/*"],
"overrides": [
{
- "files": [
- "**/*.ts"
- ],
+ "files": ["**/*.ts"],
"parserOptions": {
- "project": [
- "tsconfig.json"
- ]
+ "project": ["tsconfig.json"]
},
"rules": {
"@angular-eslint/directive-selector": [
@@ -49,33 +41,20 @@
"error",
{
"selector": "memberLike",
- "modifiers": [
- "private"
- ],
- "format": [
- "camelCase"
- ],
+ "modifiers": ["private"],
+ "format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
- "modifiers": [
- "protected"
- ],
- "format": [
- "camelCase"
- ],
+ "modifiers": ["protected"],
+ "format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "memberLike",
- "modifiers": [
- "private"
- ],
- "format": [
- "UPPER_CASE",
- "camelCase"
- ],
+ "modifiers": ["private"],
+ "format": ["UPPER_CASE", "camelCase"],
"leadingUnderscore": "allow"
}
],
diff --git a/README.md b/README.md
index f028b15..c60f539 100644
--- a/README.md
+++ b/README.md
@@ -7,8 +7,8 @@ Install dependencies:
- ```sh
yarn add keycloak-angular keycloak-js ngx-toastr @biesbjerg/ngx-translate-extract-marker @ngx-translate/core @ngx-translate/http-loader dayjs lodash-es ngx-translate-messageformat-compiler
```
-- `yarn add @types/lodash-es -D`
-- `ng add @angular/material`
+- `yarn add @types/lodash-es -D`
+- `ng add @angular/material`
In `app.module.ts` add:
diff --git a/src/lib/error/server-error-interceptor.ts b/src/lib/error/server-error-interceptor.ts
index 4a4e7be..ced978b 100644
--- a/src/lib/error/server-error-interceptor.ts
+++ b/src/lib/error/server-error-interceptor.ts
@@ -9,9 +9,8 @@ import { KeycloakService } from 'keycloak-angular';
function updateSeconds(seconds: number) {
if (seconds === 0 || seconds === 1) {
return seconds + 1;
- } else {
- return seconds * seconds;
}
+ return seconds * seconds;
}
function isNotServerError(error: HttpErrorResponse) {
diff --git a/src/lib/inputs/details-radio/details-radio.component.html b/src/lib/inputs/details-radio/details-radio.component.html
index 7d05d18..15d7914 100644
--- a/src/lib/inputs/details-radio/details-radio.component.html
+++ b/src/lib/inputs/details-radio/details-radio.component.html
@@ -4,7 +4,7 @@
*ngFor="let option of options"
[class.active]="option.value === value?.value"
class="option pointer"
- [ngClass]="{'mb-8': !displayInRow, 'mr-8': displayInRow }"
+ [ngClass]="{ 'mb-8': !displayInRow, 'mr-8': displayInRow }"
>
diff --git a/src/lib/upload-file/upload-file.component.ts b/src/lib/upload-file/upload-file.component.ts
index 2373f03..42fbb83 100644
--- a/src/lib/upload-file/upload-file.component.ts
+++ b/src/lib/upload-file/upload-file.component.ts
@@ -7,7 +7,7 @@ import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Ou
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UploadFileComponent {
- @ViewChild('attachFileInput', {static: true}) attachFileInput!: ElementRef;
+ @ViewChild('attachFileInput', { static: true }) attachFileInput!: ElementRef;
@Input() file!: File | null;
@Input() readonly = false;
diff --git a/src/lib/utils/functions.ts b/src/lib/utils/functions.ts
index bddaf61..14b0839 100644
--- a/src/lib/utils/functions.ts
+++ b/src/lib/utils/functions.ts
@@ -81,7 +81,7 @@ export function getLeftDateTime(ISOString: string) {
const minutesFromNow = date.diff(now, 'minutes');
const minutesLeft = minutesFromNow - HOURS_IN_A_DAY * MINUTES_IN_AN_HOUR * daysLeft;
- return {daysLeft, hoursLeft, minutesLeft};
+ return { daysLeft, hoursLeft, minutesLeft };
}
export function deepDiffObj(base: Record, object: Record) {
diff --git a/src/lib/utils/http-encoder.ts b/src/lib/utils/http-encoder.ts
index b94c335..231c195 100644
--- a/src/lib/utils/http-encoder.ts
+++ b/src/lib/utils/http-encoder.ts
@@ -16,4 +16,3 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
return vv.replace(/\+/gi, '%2B');
}
}
-
diff --git a/src/lib/utils/pruning-translation-loader.ts b/src/lib/utils/pruning-translation-loader.ts
index b9b0985..f618ac6 100644
--- a/src/lib/utils/pruning-translation-loader.ts
+++ b/src/lib/utils/pruning-translation-loader.ts
@@ -8,8 +8,7 @@ interface T {
}
export class PruningTranslationLoader implements TranslateLoader {
- constructor(private _http: HttpClient, private _prefix: string, private _suffix: string) {
- }
+ constructor(private _http: HttpClient, private _prefix: string, private _suffix: string) {}
getTranslation(lang: string): Observable {
return this._http.get(`${this._prefix}${lang}${this._suffix}`).pipe(map(result => this._process(result as T)));
diff --git a/tsconfig.json b/tsconfig.json
index 20aa2e5..025e726 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -9,13 +9,17 @@
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
- "lib": ["dom", "es2020"],
+ "lib": [
+ "dom",
+ "es2020"
+ ],
"allowSyntheticDefaultImports": true
},
- "include": ["**/*.ts"],
+ "include": [
+ "**/*.ts"
+ ],
"angularCompilerOptions": {
"strictInjectionParameters": true,
- "strictInputAccessModifiers": true,
- "strictTemplates": true
+ "strictInputAccessModifiers": true
}
}