try fix v2

This commit is contained in:
Dan Percic 2022-06-20 21:40:19 +03:00
parent fa923cf366
commit de0d55b5b9
9 changed files with 25 additions and 45 deletions

View File

@ -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"
}
],

View File

@ -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:

View File

@ -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) {

View File

@ -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 }"
>
<div class="flex-align-items-center mb-8">
<iqser-round-checkbox [active]="option.value === value?.value" class="mr-6"></iqser-round-checkbox>

View File

@ -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;

View File

@ -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<string, unknown>, object: Record<string, unknown>) {

View File

@ -16,4 +16,3 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec {
return vv.replace(/\+/gi, '%2B');
}
}

View File

@ -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<T> {
return this._http.get(`${this._prefix}${lang}${this._suffix}`).pipe(map(result => this._process(result as T)));

View File

@ -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
}
}