Skip to content

Commit

Permalink
change all to use === instead of ==
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Dec 17, 2024
1 parent 16b6437 commit 114b64c
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 33 deletions.
28 changes: 11 additions & 17 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import unusedImports from 'eslint-plugin-unused-imports'
import stylistic from '@stylistic/eslint-plugin'
import html from '@html-eslint/eslint-plugin'
import angular from 'angular-eslint'
import htmlParser from '@html-eslint/parser'

export default tsEslint.config(
{
Expand Down Expand Up @@ -76,12 +75,10 @@ export default tsEslint.config(
},
],
'prefer-rest-params': 'error',
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions', 'constructors'] }],
'@typescript-eslint/no-empty-function': ['error', {allow: ['arrowFunctions', 'constructors']}],
'@stylistic/lines-around-comment': ['error'],
'@angular-eslint/no-empty-lifecycle-method': 'error',
'@angular-eslint/component-class-suffix': 'error',
'@angular-eslint/template/eqeqeq': 'off',
'@angular-eslint/template/interactive-supports-focus': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@stylistic/no-extra-parens': 'off',
Expand All @@ -95,15 +92,15 @@ export default tsEslint.config(
// '@stylistic/quotes': ['error', 'double'],
'@stylistic/padded-blocks': ['error', 'never'],
'@stylistic/dot-location': ['error', 'property'],
'@stylistic/newline-per-chained-call': ['error', { ignoreChainWithDepth: 1 }],
'@stylistic/newline-per-chained-call': ['error', {ignoreChainWithDepth: 1}],
'@stylistic/indent': ['error', 2],
'@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/object-property-newline': ['error'],
'@stylistic/multiline-ternary': ['off'],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/array-bracket-newline': ['error', { minItems: 4 }],
'@stylistic/array-bracket-newline': ['error', {minItems: 4}],
'@stylistic/semi-style': ['error'],
'@stylistic/function-paren-newline': ['error', { minItems: 4 }],
'@stylistic/function-paren-newline': ['error', {minItems: 4}],
'@angular-eslint/directive-selector': [
'error',
{
Expand Down Expand Up @@ -136,23 +133,20 @@ export default tsEslint.config(

{
files: ['**/*.html'],
// recommended configuration included in the plugin
...html.configs['flat/recommended'],
//extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
//processor: angular.processInlineTemplates,
//languageOptions: {
//parser: angularTemplateParser,
//},
extends: [
...angular.configs.templateRecommended,
],
languageOptions: {
parser: htmlParser,
parser: angular.templateParser,
},

rules: {
...html.configs['flat/recommended'].rules,
// Must be defined. If not, all recommended rules will be lost
'@angular-eslint/template/eqeqeq': 'error',
'@html-eslint/indent': ['error', 2],
'@html-eslint/require-img-alt': 'off',
'@html-eslint/element-newline': 'off',
'@html-eslint/require-closing-tags': ['error', { selfClosing: 'always' }],
'@html-eslint/require-closing-tags': ['error', {selfClosing: 'always'}],
},
},
{
Expand Down
6 changes: 1 addition & 5 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"private": true,
"dependencies": {
"@angular-eslint/eslint-plugin-template": "^19.0.2",
"@angular/animations": "^18.2.8",
"@angular/cdk": "^18.2.9",
"@angular/common": "^18.2.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h4 class="confidence-label">Confidence</h4>
</section>

<section class="d-flex gap-4 flex-row mb-2-rem">
<ng-container *ngIf="keyResult.keyResultType == 'metric' && castToMetric(keyResult) as keyResultMetric">
<ng-container *ngIf="keyResult.keyResultType === 'metric' && castToMetric(keyResult) as keyResultMetric">
<div class="d-flex justify-content-start w-100 metric-label-div">
<p class="keyResult-detail-attribute-show rounded-5 p-2 d-flex justify-content-center metric-col">
Baseline: {{ keyResultMetric.baseline | unitTransformation: keyResultMetric.unit }}
Expand All @@ -76,7 +76,7 @@ <h4 class="confidence-label">Confidence</h4>
</div>
</ng-container>

<ng-container *ngIf="keyResult.keyResultType == 'ordinal' && castToOrdinal(keyResult) as keyResultOrdinal">
<ng-container *ngIf="keyResult.keyResultType === 'ordinal' && castToOrdinal(keyResult) as keyResultOrdinal">
<div class="d-flex justify-content-between w-100 ordinal-div mb-4">
<div class="ordinal-col h-auto">
<h4 class="mb-1">Commit</h4>
Expand Down Expand Up @@ -106,7 +106,7 @@ <h3 class="mb-1">Beschrieb</h3>
<p class="linebreak">{{ keyResult.description || "-" }}</p>
</div>

<div *ngIf="keyResult.actionList?.length != 0" class="mb-2-rem">
<div *ngIf="keyResult.actionList?.length !== 0" class="mb-2-rem">
<h3>Action Plan</h3>
<div *ngFor="let action of keyResult.actionList">
<div *ngIf="action.isChecked">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3 class="linebreak mb-3">{{ keyResult.title }}</h3>
<div class="d-flex justify-content-center align-items-center flex-wrap">
<h4 class="text-nowrap me-2">Letztes Check-in</h4>
<span class="keyResult-attribute-show">{{
getKeyResultWithCorrectType().lastCheckIn == null
getKeyResultWithCorrectType().lastCheckIn === null
? "Keines"
: (getKeyResultWithCorrectType().lastCheckIn!.createdOn | date: DATE_FORMAT)
}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3 class="mb-1">Beschrieb</h3>
<p>{{ objective.description }}</p>
</div>

<div class="d-flex align-items-center flex-row justify-content-start" *ngIf="objective.state.toUpperCase() != 'SUCCESSFUL' && objective.state.toUpperCase() != 'NOTSUCCESSFUL'">
<div class="d-flex align-items-center flex-row justify-content-start" *ngIf="objective.state.toUpperCase() !== 'SUCCESSFUL' && objective.state.toUpperCase() !== 'NOTSUCCESSFUL'">
<button
*ngIf="objective.writeable"
mat-flat-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<app-team *ngFor="let overviewEntity of overviewEntities$ | async; trackBy: trackByFn" [overviewEntity]="overviewEntity">
</app-team>
<div *ngIf="(overviewEntities$ | async)?.length == 0" class="d-flex align-items-center flex-column pt-5 gap-5">
<div *ngIf="(overviewEntities$ | async)?.length === 0" class="d-flex align-items-center flex-column pt-5 gap-5">
<p id="no-team-text">Kein Team ausgewählt</p>
<img
src="{{ this.backgroundLogoSrc$ | async }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<button (click)="toggleAll()" class="icon-button focus-outline mt-1 me-1">
<mat-chip
[attr.data-testId]="'team-filter-alle'"
[highlighted]="activeTeams.length == (this.teams$ | async)?.length"
[highlighted]="activeTeams.length === (this.teams$ | async)?.length"
color="primary"
>
<p>Alle</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5 class="text-center text-small">Target</h5>
[attr.data-testId]="'fail'"
class="child h-100 d-flex align-items-center"
>
<div *ngIf="keyResult.keyResultType == 'metric' && calculateCurrentPercentage(castToMetric()) < 1" class="fs-6 text-white fw-bold text-center score-red scoring-error-badge rounded-circle">
<div *ngIf="keyResult.keyResultType === 'metric' && calculateCurrentPercentage(castToMetric()) < 1" class="fs-6 text-white fw-bold text-center score-red scoring-error-badge rounded-circle">
!
</div>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h4 class="okr-form-label okr-form-col">Objective</h4>
<button
class="col successful valuation-card card-hover-successful"
[ngClass]="{
'active-successful': completeForm.value.isSuccessful == true,
'active-successful': completeForm.value.isSuccessful === true,
'non-active-successful': completeForm.value.isSuccessful === false,
}"
(click)="switchSuccessState('successful')"
Expand All @@ -28,7 +28,7 @@ <h4 class="okr-form-label okr-form-col">Objective</h4>
class="col not-successful valuation-card card-hover-not-successful"
[ngClass]="{
'active-not-successful': completeForm.value.isSuccessful === false,
'non-active-not-successful': completeForm.value.isSuccessful == true,
'non-active-not-successful': completeForm.value.isSuccessful === true,
}"
(click)="switchSuccessState('notSuccessful')"
(keydown.enter)="switchSuccessState('notSuccessful')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
</button>
</div>

<div class="col-auto" *ngIf="data.objective.objectiveId && data.action != 'duplicate'">
<div class="col-auto" *ngIf="data.objective.objectiveId && data.action !== 'duplicate'">
<button
color="primary"
type="button"
Expand Down

0 comments on commit 114b64c

Please sign in to comment.