Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace12679 #12730

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Course } from '../../../types/api-output';
import { FEEDBACK_SESSION_NAME_MAX_LENGTH } from '../../../types/field-validator';
import { FormControl, FormGroup, Validators } from '@angular/forms';

Check failure on line 5 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

`@angular/forms` import should occur before import of `@ng-bootstrap/ng-bootstrap`

Check failure on line 5 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

`@angular/forms` import should occur before import of `@ng-bootstrap/ng-bootstrap`

/**
* Copy current session modal.
Expand All @@ -27,6 +28,11 @@

constructor(public activeModal: NgbActiveModal) {}

formCopySessionModel = new FormGroup({

Check failure on line 31 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Trailing spaces not allowed

Check failure on line 31 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Trailing spaces not allowed
newFeedbackSessionName: new FormControl('', [Validators.required, this.noWhitespaceValidator])

Check failure on line 32 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Trailing spaces not allowed

Check failure on line 32 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing trailing comma

Check failure on line 32 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Trailing spaces not allowed

Check failure on line 32 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing trailing comma
});

Check failure on line 33 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Trailing spaces not allowed

Check failure on line 33 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Trailing spaces not allowed


Check failure on line 35 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

More than 1 blank line not allowed

Check failure on line 35 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

More than 1 blank line not allowed
/**
* Fires the copy event.
*/
Expand All @@ -48,4 +54,12 @@
this.copyToCourseSet.add(courseId);
}
}

Check failure on line 57 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Trailing spaces not allowed

Check failure on line 57 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Trailing spaces not allowed
// Added validation for whitespace.
noWhitespaceValidator(control: { value: any; }) {

Check failure on line 59 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Missing return type on function

Check failure on line 59 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Unexpected separator (;)

Check failure on line 59 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Missing return type on function

Check failure on line 59 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Unexpected separator (;)
const isWhitespace = (control.value || '').trim().length === 0;
const isValid = !isWhitespace;
return isValid ? null : { 'whitespace': true };

Check failure on line 62 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Unnecessarily quoted property 'whitespace' found

Check failure on line 62 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Unnecessarily quoted property 'whitespace' found
}

}
Loading