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

Chore/client tests codestyle docs #1305

Merged
merged 174 commits into from
May 2, 2020
Merged
Show file tree
Hide file tree
Changes from 170 commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
9eea777
update client configs
Apr 13, 2020
39c6080
update more config
Apr 13, 2020
eb1e846
also apply prettier on js files and format them except k6 files to av…
Apr 13, 2020
c1e47fb
Merge branch 'develop' into chore/client-tests-codestyle-docs
Apr 14, 2020
9b1ddf1
Fix typescript code formatting
sascha11110 Apr 14, 2020
5da7dda
remove unused variable
linusmichel Apr 14, 2020
5e64507
Fix batch of codestyle issues.
sleiss Apr 14, 2020
69c841e
Fix more style errors.
sleiss Apr 14, 2020
093f9dc
fix batch of codestyle issues
JonasPetry Apr 14, 2020
281c9b6
Merge remote-tracking branch 'origin/chore/client-tests-codestyle-doc…
JonasPetry Apr 14, 2020
10f09b1
remove some unused declarations
filip-gregurevic Apr 14, 2020
057426c
fixed all unused declarations
filip-gregurevic Apr 14, 2020
8d96efc
Merge branch 'chore/client-tests-codestyle-docs' of https://github.co…
filip-gregurevic Apr 14, 2020
fb636de
Fix code style issues
sascha11110 Apr 15, 2020
a8ed9d3
Fix more code style issues
sascha11110 Apr 15, 2020
1c03728
Fix even more code style issues
sascha11110 Apr 15, 2020
e80a783
Fix remaining code style issues
sascha11110 Apr 15, 2020
0a19509
Fix failing test: default value for page in audits component should b…
sascha11110 Apr 15, 2020
b0d2130
Fix failing test: remove test case as filterNaN function no longer ex…
sascha11110 Apr 15, 2020
7b3b3a6
Fix failing test: adjust resource url to real value in metrics service
sascha11110 Apr 15, 2020
f74bef4
Fix failing test: remove two expect statements as servicesStats and c…
sascha11110 Apr 15, 2020
5acfed8
fix "sets focus after the view has been initialized" test case
JonasPetry Apr 15, 2020
1ead4a3
Fix password reset init component test
sascha11110 Apr 16, 2020
8bfe6ad
Fix failing test: Remove "Should call load all on init" as loadAll is…
sascha11110 Apr 16, 2020
11ccb41
Fix failing test: add missing fields to compared user object in user …
sascha11110 Apr 16, 2020
c3cd3ef
add plugin for chai support
filip-gregurevic Apr 17, 2020
cf59cc9
supress eslint warning for mock methods
JonasPetry Apr 18, 2020
59b3cc6
Merge branch 'develop' into chore/client-tests-codestyle-docs
madwau Apr 18, 2020
b7957c8
Chai friendly eslint rules + clean up code-editor-status.spec.ts
madwau Apr 18, 2020
71d2695
Fix complaints.spec.ts, exercise-hint.service.spec.ts, file-upload-as…
madwau Apr 18, 2020
7db130c
Fix file-upload-exercise-detail.component.spec.ts and file-upload-res…
madwau Apr 18, 2020
7852729
Fix file-upload-submission.spec.ts
madwau Apr 18, 2020
d0ff139
removed unused variables
F4lka Apr 18, 2020
a7e99d2
moved variables to avoid shadowed varialves
F4lka Apr 18, 2020
970e9e3
fix participation-submission.spec.ts and build-plan-link.directive.sp…
F4lka Apr 18, 2020
fb2bcdc
Fix batch of code style issues
Apr 18, 2020
92f61f9
Merge remote-tracking branch 'origin/chore/client-tests-codestyle-doc…
Apr 18, 2020
dc2c84c
fix code style issues
F4lka Apr 19, 2020
f455d52
Merge remote-tracking branch 'origin/chore/client-tests-codestyle-doc…
F4lka Apr 19, 2020
263dd13
fix code style issues
F4lka Apr 19, 2020
5304b07
Revert "fix code style issues"
F4lka Apr 19, 2020
b9d5913
fix code-editor-file-browser.spec.ts
clemenszuck Apr 19, 2020
b275f11
fix code-editor-file-browser.spec.ts again
clemenszuck Apr 19, 2020
ca0ced6
fix code style issues
balazs-czopf Apr 19, 2020
22d7f1e
turn off "no-unused-vars" warning for mock TypeScript files
Adem-Khachnaoui Apr 19, 2020
b5239d0
Fix delete-dialog-service.spec.ts and guided-tour.service.spec.ts
bigultekin Apr 19, 2020
045b344
Merge branch 'chore/client-tests-codestyle-docs' of https://github.co…
bigultekin Apr 19, 2020
9aee646
Fix batch of code style issues
bigultekin Apr 19, 2020
833720b
fix mock-auth-server-provider.service.ts
Apr 19, 2020
d4d1014
Fix mock-cookie.service.ts
Apr 19, 2020
774d48e
Fix code style in quiz related files
sascha11110 Apr 19, 2020
200c456
fix ts-lint errors in metrics-modal.component.spec.ts, course.service…
TobiasPr Apr 19, 2020
688bc18
Fix more code style issues
sascha11110 Apr 19, 2020
9309ad6
Fix code style issues: remove unnecessary imports
sascha11110 Apr 19, 2020
9c73dd4
Fix failing tests in text-exercise-assessment.spec.ts
sascha11110 Apr 20, 2020
64b4494
Merge branch 'chore/client-tests-codestyle-docs' of github.com:ls1int…
TobiasPr Apr 20, 2020
ffdd7a6
Fix code style warnings and errore for:
Apr 20, 2020
c93d0d4
Fix code style for participation-websocket-service.spec.ts, programmi…
Apr 20, 2020
e0f6acc
remove unused imports, try to ignore false postive no-unused-vars
Apr 20, 2020
fb8d2cc
Merge branch 'develop' into chore/client-tests-codestyle-docs
Apr 21, 2020
ef1e71a
fix compile errors
Apr 21, 2020
54fffae
fix config for yarn webpack:build and yarn start commands
Apr 21, 2020
7875e97
small spec config change
Apr 21, 2020
ff37043
Ignore false positive of chai-friendly/no-unused-expressions
sascha11110 Apr 21, 2020
c8787f9
Fix code style issue: "Expected an assignment or function call"
sascha11110 Apr 21, 2020
a85d796
Fix code style issues: is defined but never used
sascha11110 Apr 21, 2020
4aff8bb
Fix code style issues: is assigned a value but never used
sascha11110 Apr 21, 2020
7e2daf8
Fix code style issue: == should be ===
sascha11110 Apr 21, 2020
b6fbade
Fix code style issue: shadowed name
sascha11110 Apr 21, 2020
9316487
Fix code style issue: Exceeds maximum line length
sascha11110 Apr 21, 2020
1fc6159
Fix now failing test cases due to added multi-line strings
sascha11110 Apr 21, 2020
7b4346c
Fix code style issue in date-time-picker component
sascha11110 Apr 21, 2020
530360f
Temporarily disable "completed-docs" lint rule
sascha11110 Apr 22, 2020
4944eaa
Fix failing test case in user-route-access-service.spec.ts
sascha11110 Apr 22, 2020
108a803
Fix failing test cases in course.service.spec.ts
sascha11110 Apr 22, 2020
ae61211
Fix failing test cases in participation-websocket-service.spec.ts
sascha11110 Apr 22, 2020
a9addbc
Fix failing test case in guided-tour.service.spec.ts
sascha11110 Apr 22, 2020
092978f
Fix failing test case in programming-exercise-instructor-submission-s…
sascha11110 Apr 22, 2020
1c04a10
Fix test
madwau Apr 22, 2020
308a1b3
Fix test
madwau Apr 22, 2020
4b5cf7d
Merge branch 'develop' into chore/client-tests-codestyle-docs
madwau Apr 22, 2020
73c8daf
Set testPathIgnorePatterns to ignore mock files
sascha11110 Apr 22, 2020
69bc742
Restore jest.config.js
sascha11110 Apr 22, 2020
f5767ba
Remove unnecessary test suite quiz-submission-detail.component.spec.ts
sascha11110 Apr 22, 2020
e5b29a6
Prevent jest from handling mocks, helpers, utils as test suites
sascha11110 Apr 22, 2020
8cbcf27
Fix imports in test suites so that their test cases will be executed
sascha11110 Apr 23, 2020
4f30f8a
Delete outdated test suites
sascha11110 Apr 23, 2020
099ac6d
Delete doubled test suites
sascha11110 Apr 23, 2020
4fd9a08
Adjust settings.component.spec to jhipster reference implementation
sascha11110 Apr 23, 2020
63842e7
Remove JhiTrackerservice from passwort.component.spec
sascha11110 Apr 23, 2020
33124ab
Delete course.component.spec.ts
sascha11110 Apr 23, 2020
de4c848
Delete file-upload-submission.component.spec.ts
sascha11110 Apr 23, 2020
0a311a0
Add component/service identifier to filename of all test suites
sascha11110 Apr 23, 2020
8b5a625
Remove unnecessary /* tslint:disable:no-unused-expression */
sascha11110 Apr 23, 2020
1c0d825
Fix new code style issues
sascha11110 Apr 23, 2020
8b4a51e
Add integration identifier to all test suites
sascha11110 Apr 23, 2020
7ca4869
Assign all files in component directory to correct folder
sascha11110 Apr 23, 2020
3c956ac
Fix import in test.module.ts
sascha11110 Apr 23, 2020
42ae563
Remove duplicate mock for account.service
sascha11110 Apr 23, 2020
241ce00
Delete unnecessary mock-websocket.service.ts
sascha11110 Apr 23, 2020
cda0f66
Move some activated route mocks from /helpers/ to /mocks/
sascha11110 Apr 23, 2020
22568df
Move some mocks from /helpers/ to /mocks/
sascha11110 Apr 23, 2020
8470b8e
Add setIdentityResponse() to mock-account.service.ts
sascha11110 Apr 23, 2020
37c9ae7
Merge duplicate mocks of alert.service
sascha11110 Apr 23, 2020
a9cbcc4
Move mocks of services in own sub-directory
sascha11110 Apr 24, 2020
827e856
Move all test suites from spec/app to spec/component or spec/service
sascha11110 Apr 24, 2020
76f53e9
Group all non-spec files (mocks, utils, samples) in /helpers/ directo…
sascha11110 Apr 24, 2020
5180c4a
Merge branch 'develop' into chore/client-tests-codestyle-docs
sascha11110 Apr 24, 2020
776ce89
Merge branch 'develop' into chore/client-tests-codestyle-docs
sascha11110 Apr 24, 2020
d3c80aa
Fix test case in course-detail.component.spec.ts
sascha11110 Apr 24, 2020
9697e6c
Merge remote-tracking branch 'origin/chore/client-tests-codestyle-doc…
sascha11110 Apr 24, 2020
85052b8
Remove unnecessary describe('Component Tests'... from all test suites
sascha11110 Apr 24, 2020
7b8d5d3
Fix new code style issue
sascha11110 Apr 24, 2020
535e30f
Remove unnecessary /* tslint:disable max-line-length */
sascha11110 Apr 24, 2020
f73d9b4
Remove unnecessary describe('Service Tests'... from all test suites
sascha11110 Apr 24, 2020
3c78375
Remove duplicated MockRouter class
sascha11110 Apr 24, 2020
fbe34e9
MockRouter is not a service mock
sascha11110 Apr 24, 2020
51b7d18
Remove one of the duplicated MockActivatedRoute implementations
sascha11110 Apr 24, 2020
aafd9ec
Move MockActivatedRoute to correct directory
sascha11110 Apr 24, 2020
c49ad3c
Rename mock-activated.route.ts
sascha11110 Apr 24, 2020
e817d7e
import Mock classes in file-upload-exercise.component.spec.ts
JonasPetry Apr 24, 2020
813b264
Fix programming-exercise.service.spec.ts
madwau Apr 24, 2020
d4c231d
Fix register.component.spec.ts
madwau Apr 24, 2020
cc635e3
Fix tests.
sleiss Apr 24, 2020
b9f972c
Merge remote-tracking branch 'origin/chore/client-tests-codestyle-doc…
sleiss Apr 24, 2020
f700d4b
Fix test case in quiz-exercise.component.spec.ts
sascha11110 Apr 25, 2020
cd37f0f
Remove duplicated provider for LocalStorageService
sascha11110 Apr 25, 2020
3a14dda
Fix test cases in quiz-exercise.service.spec.ts
sascha11110 Apr 25, 2020
326f39b
Fix test case in file-upload-exercise.component.spec.ts
sascha11110 Apr 25, 2020
fd219ea
Remove unnecessary import from file-upload-exercise.component.spec.ts
sascha11110 Apr 25, 2020
17552af
Fix test case in text-exercise-update.component.spec.ts
balazs-czopf Apr 25, 2020
935162d
Fix test case in text-exercise-update.component.spec.ts #2
balazs-czopf Apr 25, 2020
3d56efb
Fix test case in text-submission.service.spec.ts
balazs-czopf Apr 25, 2020
d13998b
fix test case in file-upload-exercise-update.component.spec.ts
Adem-Khachnaoui Apr 26, 2020
02f1486
Fix test cases in settings.component.spec.ts
sascha11110 Apr 26, 2020
c7b0a4b
fix quiz-exercise-detail.component.spec.ts tests
Apr 26, 2020
73fc7e6
Fix test cases in quiz-exercise-detail.component.spec.ts
sascha11110 Apr 26, 2020
8084ab1
fixed text-exercise-detail.component.spec.ts
F4lka Apr 26, 2020
179f26c
fixed text-exercise.service.spec.ts
F4lka Apr 26, 2020
9771282
delete outdated test cases: modeling-submission.service.spec.ts,
filip-gregurevic Apr 26, 2020
90ecef7
fit new service methods
filip-gregurevic Apr 26, 2020
d38b5e7
fix participation.service.spec.ts find() test and delete redundant cr…
Apr 26, 2020
bd10d7d
Merge branch 'chore/client-tests-codestyle-docs' of https://github.co…
Apr 26, 2020
6963bcf
fix assigned test suites
filip-gregurevic Apr 26, 2020
5675939
Merge branch 'chore/client-tests-codestyle-docs' of https://github.co…
filip-gregurevic Apr 26, 2020
87404c5
fix participation list for exercise test case in participation.servic…
Apr 26, 2020
66e73d5
Fix test case in text-exercise.component.spec.ts
sjagla27 Apr 27, 2020
3cb9a2c
Fix 4/5 of the tests in file-upload-exercise.service.spec.ts
Apr 27, 2020
423b840
Merge remote to local branch
Apr 27, 2020
48b7e42
fix testcase in modeling-exercise-update.component.spec.ts
clemenszuck Apr 27, 2020
4052be4
WIP file-upload-exercise.service.spec.ts
Apr 27, 2020
dad89ae
Fix last test in file-upload-exercise.service.spec.ts
Apr 27, 2020
559a888
fix testcases in modeling-assessment-editor.component.spec.ts
clemenszuck Apr 27, 2020
ea54aca
Merge branch 'chore/client-tests-codestyle-docs' of https://github.co…
clemenszuck Apr 27, 2020
1d279e1
Merge branch 'chore/client-tests-codestyle-docs' of https://github.co…
Apr 27, 2020
3307308
fix test in participation.service.ts
Apr 27, 2020
bc4668c
Fix remaining code style issues
sascha11110 Apr 28, 2020
7484858
Import and provide missing LocalStorageService
Apr 28, 2020
b937e0e
Add sessionStorage mock
Apr 28, 2020
edf5fb3
Fix Failing Tests on course-update.component.spec.ts
Apr 28, 2020
dd70498
Merge branch 'develop' into chore/client-tests-codestyle-docs
sascha11110 Apr 29, 2020
40f846e
Fix test cases in course-exercise-row.component.spec.ts
sascha11110 Apr 29, 2020
54b2a05
Fix test cases in text-submissions-assessment.component.spec.ts
sascha11110 Apr 29, 2020
01a11f1
Fix test case in modeling-exercise.component.spec.ts
sascha11110 Apr 29, 2020
db8deeb
Fix test case in modeling-exercise-detail.component.spec.ts
sascha11110 Apr 30, 2020
8fae4bd
Use newer rxjs pipe syntax in file-upload-submission.service.ts
sascha11110 Apr 30, 2020
df9c731
Fix test cases in file-upload-submission.service.spec.ts
sascha11110 Apr 30, 2020
5333909
Fix new code style issues
sascha11110 Apr 30, 2020
89b035f
Completely remove empty text-assessment.component.ts
sascha11110 Apr 30, 2020
012100d
Delete text-exercise-assessment.component.spec.ts as in commit ecc45b…
sascha11110 Apr 30, 2020
fa13a77
Merge branch 'develop' into chore/client-tests-codestyle-docs
Apr 30, 2020
6e8f0b5
Apply suggestions from code review
Apr 30, 2020
09dc483
Merge branch 'develop' into chore/client-tests-codestyle-docs
May 1, 2020
c1ca26f
Revert changes in date-time-picker.component
sascha11110 May 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ src/main/generated/
src/main/java/
src/main/jib/
src/main/resources/
src/test/
src/test/javascript/e2e/
src/test/javascript/protractor.conf.js
src/test/javascript/jest.conf.js
src/test/k6/
uploads/
webpack/
target/
Expand Down
21 changes: 15 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"plugins": [
"@typescript-eslint",
"@typescript-eslint/tslint"
"@typescript-eslint/tslint",
"chai-friendly"
],
"extends": [
// "plugin:@typescript-eslint/eslint-recommended",
// "plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
Expand All @@ -22,7 +21,10 @@
"@typescript-eslint/tslint/config": [
"error",
{
"lintFile": "./tslint.json"
"lintFile": "./tslint.json",
"rules": {
"no-unused-expressions": "off"
}
}
],
"@typescript-eslint/no-unused-vars": [
Expand All @@ -33,6 +35,13 @@
"ignoreRestSiblings": false
}
],
"@typescript-eslint/no-non-null-assertion": "off"
}
"@typescript-eslint/no-non-null-assertion": "off",
"chai-friendly/no-unused-expressions": 2
},
"overrides": [{
"files": ["mock-*.ts"],
"rules": {
"@typescript-eslint/no-unused-vars": "off"
}
}]
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"compare-versions": "3.6.0",
"core-js": "3.6.5",
"dompurify": "2.0.10",
"eslint-plugin-chai-friendly": "^0.5.0",
krusche marked this conversation as resolved.
Show resolved Hide resolved
"export-to-csv": "0.2.1",
"franc-min": "5.0.0",
"interactjs": "1.9.10",
Expand Down Expand Up @@ -77,6 +78,7 @@
"sugar": "2.0.6",
"ts-jest": "25.4.0",
"tslib": "1.11.1",
"tslint-no-unused-expression-chai": "^0.1.4",
krusche marked this conversation as resolved.
Show resolved Hide resolved
"webstomp-client": "1.2.6",
"yarn": "1.22.4",
"zone.js": "0.10.3"
Expand Down Expand Up @@ -176,9 +178,9 @@
"src/{main,test}/java/**/*.java": "bash ./linting.sh"
},
"scripts": {
"prettier:format": "prettier --write 'src/{main/webapp,test}/**/*.{json,ts,css,scss,html}'",
"prettier:check": "prettier --check 'src/{main/webapp,test}/**/*.{json,ts,css,scss,html}'",
"lint": "eslint . --ext .ts",
"prettier:format": "prettier --write 'src/{main/webapp,test}/**/*.{json,ts,js,css,scss,html}'",
"prettier:check": "prettier --check 'src/{main/webapp,test}/**/*.{json,ts,js,css,scss,html}'",
"lint": "eslint . --ext .ts && yarn run lint:doc",
krusche marked this conversation as resolved.
Show resolved Hide resolved
"lint:fix": "yarn run lint --fix",
"lint:doc": "tslint --config tslint-doc.json --project tsconfig.json -e 'node_modules/**'",
"ngc": "ngc -p tsconfig.app.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ export class PasswordResetFinishComponent implements OnInit, AfterViewInit {
}

ngAfterViewInit() {
if (this.elementRef.nativeElement.querySelector('#password') != null) {
this.renderer.selectRootElement('#password', true).focus();
const passwordElement = this.elementRef.nativeElement.querySelector('#password');
if (passwordElement != null) {
this.renderer.selectRootElement(passwordElement, true).focus();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export class PasswordResetInitComponent implements OnInit, AfterViewInit {
}

ngAfterViewInit() {
this.renderer.selectRootElement('#email', true).focus();
const emailElement = this.elementRef.nativeElement.querySelector('#email');
if (emailElement != null) {
this.renderer.selectRootElement(emailElement, true).focus();
}
}

requestReset() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ export class NotificationMgmtUpdateComponent implements OnInit {
this.isSaving = true;
if (this.notification.id) {
this.systemNotificationService.update(this.notification).subscribe(
(response) => this.onSaveSuccess(response.body!),
() => this.onSaveSuccess(),
() => this.onSaveError(),
);
} else {
this.systemNotificationService.create(this.notification).subscribe(
(response) => this.onSaveSuccess(response.body!),
() => this.onSaveSuccess(),
() => this.onSaveError(),
);
}
}

private onSaveSuccess(result: SystemNotification) {
private onSaveSuccess() {
this.isSaving = false;
this.previousState();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, Route, RouterStateSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot, Resolve, Route } from '@angular/router';
import { JhiResolvePagingParams } from 'ng-jhipster';
import { NotificationMgmtUpdateComponent } from 'app/admin/notification-management/notification-management-update.component';
import { SystemNotification } from 'app/entities/system-notification.model';
Expand All @@ -14,9 +14,8 @@ export class NotificationMgmtResolve implements Resolve<any> {
/**
* Resolves the route and initializes system notification from id route param
* @param route
* @param state
*/
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
resolve(route: ActivatedRouteSnapshot) {
const id = route.params['id'] ? route.params['id'] : null;
if (id) {
return this.service.find(parseInt(id, 10));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export class UserManagementUpdateComponent implements OnInit {
this.isSaving = true;
if (this.user.id !== null) {
this.userService.update(this.user).subscribe(
(response) => this.onSaveSuccess(response.body!),
() => this.onSaveSuccess(),
() => this.onSaveError(),
);
} else {
this.userService.create(this.user).subscribe(
(response) => this.onSaveSuccess(response.body!),
() => this.onSaveSuccess(),
() => this.onSaveError(),
);
}
Expand All @@ -66,7 +66,7 @@ export class UserManagementUpdateComponent implements OnInit {
* Set isSaving to false and navigate to previous page
* @param result
*/
private onSaveSuccess(result: User) {
private onSaveSuccess() {
this.isSaving = false;
this.previousState();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, Route, RouterStateSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot, Resolve, Route } from '@angular/router';
import { JhiResolvePagingParams } from 'ng-jhipster';
import { User } from 'app/core/user/user.model';
import { UserService } from 'app/core/user/user.service';
Expand All @@ -14,9 +14,8 @@ export class UserMgmtResolve implements Resolve<any> {
/**
* Resolve route to find the user before the route is activated
* @param route contains the information about a route associated with a component loaded in an outlet at a particular moment in time
* @param state represents the state of the router at a moment in time
*/
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
resolve(route: ActivatedRouteSnapshot) {
const login = route.params['login'] ? route.params['login'] : null;
if (login) {
return this.userService.find(login);
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/app.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ if (module['hot']) {

platformBrowserDynamic()
.bootstrapModule(ArtemisAppModule, { preserveWhitespaces: true })
.then((platformRef) => {})
.then(() => {})
.catch((err) => console.error(err));
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { Component, Input, OnChanges } from '@angular/core';
import * as moment from 'moment';
import { Exercise } from 'app/entities/exercise.model';

Expand All @@ -22,7 +22,7 @@ export class AssessmentWarningComponent implements OnChanges {
currentDate: moment.MomentInput;
isBeforeDueDate = false;

ngOnChanges(changes: SimpleChanges): void {
ngOnChanges(): void {
const dueDate = this.exercise.dueDate;
if (dueDate != null) {
this.isBeforeDueDate = dueDate.isAfter(this.currentDate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class ComplaintsForTutorComponent implements OnInit {
this.complaintResponseService.create(this.complaintResponse).subscribe(
(response) => {
this.handled = true;
// eslint-disable-next-line chai-friendly/no-unused-expressions
this.complaint.complaintType === ComplaintType.MORE_FEEDBACK
? this.jhiAlertService.success('artemisApp.moreFeedbackResponse.created')
: this.jhiAlertService.success('artemisApp.complaintResponse.created');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class ListOfComplaintsComponent implements OnInit {
modalRef.componentInstance.result = cloneDeep(complaint.result);
modalRef.componentInstance.onResultModified.subscribe(() => this.loadComplaints());
modalRef.result.then(
(_) => this.loadComplaints(),
() => this.loadComplaints(),
() => {},
);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LocalStorageService } from 'ngx-webstorage';
import { AccountService } from 'app/core/auth/account.service';
import { StateStorageService } from 'app/core/auth/state-storage.service';
import { OrionVersionValidator } from 'app/shared/orion/outdated-plugin-warning/orion-version-validator.service';
import { filter, first, switchMap } from 'rxjs/operators';
import { first, switchMap } from 'rxjs/operators';
import { from, of } from 'rxjs';

@Injectable({ providedIn: 'root' })
Expand Down
14 changes: 0 additions & 14 deletions src/main/webapp/app/core/config/uib-pagination.config.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class AuthExpiredInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
return next.handle(request).pipe(
tap(
(event: HttpEvent<any>) => {},
() => {},
(err: any) => {
if (err instanceof HttpErrorResponse) {
if (err.status === 401) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class ErrorHandlerInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
return next.handle(request).pipe(
tap(
(event: HttpEvent<any>) => {},
() => {},
(err: any) => {
if (err instanceof HttpErrorResponse) {
if (!(err.status === 401 && (err.message === '' || (err.url && err.url.includes('/api/account'))))) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/core/login/login.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class LoginService {
return new Promise((resolve, reject) => {
this.authServerProvider.login(credentials).subscribe(
(data) => {
this.accountService.identity(true).then((user) => {
this.accountService.identity(true).then(() => {
this.websocketService.sendActivity();
resolve(data);
});
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/app/core/websocket/websocket.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class JhiWebsocketService implements IWebsocketService, OnDestroy {
};
this.stompClient = over(socket, options);
// Note: at the moment, debugging is deactivated to prevent console log statements
this.stompClient.debug = function (str) {};
this.stompClient.debug = function () {};
const headers = <ConnectionHeaders>{};
headers['X-CSRF-TOKEN'] = this.csrfService.getCSRF();

Expand Down Expand Up @@ -148,7 +148,7 @@ export class JhiWebsocketService implements IWebsocketService, OnDestroy {

// Setup periodic logs of websocket connection numbers
this.logTimers.push(
timer(0, 60000).subscribe((x) => {
timer(0, 60000).subscribe(() => {
console.log('\n\n');
console.log(`${this.subscribers.size} websocket subscriptions: `, this.subscribers.keys());
// this.subscribers.forEach((sub, topic) => console.log(topic));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export class CourseScoresComponent implements OnInit, OnDestroy {
if (this.exerciseTitlesPerType.get(exerciseType) && this.exerciseTitlesPerType.get(exerciseType)!.length !== 0) {
const exerciseTypeName = capitalizeFirstLetter(exerciseType);
const exerciseTitleKeys = this.exerciseTitlesPerType.get(exerciseType)!;
exerciseTitleKeys.forEach((title, index) => {
exerciseTitleKeys.forEach((title) => {
emptyLine[title] = '';
});
emptyLine[exerciseTypeName + ' ' + POINTS_KEY] = '';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { SERVER_API_URL } from 'app/app.constants';
import { Injectable } from '@angular/core';
import { ProgrammingSubmission } from 'app/entities/programming-submission.model';
import { Result } from 'app/entities/result.model';
Expand Down
6 changes: 2 additions & 4 deletions src/main/webapp/app/course/manage/course-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class CourseGroupComponent implements OnInit, OnDestroy {
// Flash green background color to signal to the user that this record was added
this.flashRowClass(cssClasses.newlyAddedMember);
},
(err) => {
() => {
this.isTransitioning = false;
},
);
Expand Down Expand Up @@ -237,10 +237,8 @@ export class CourseGroupComponent implements OnInit, OnDestroy {

/**
* Computes the row class that is being added to all rows of the datatable
*
* @param row Row from ngx datatable
*/
dataTableRowClass = (row: any) => {
dataTableRowClass = () => {
return this.rowClass;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpResponse } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot, Routes } from '@angular/router';
import { ActivatedRouteSnapshot, Resolve, Routes } from '@angular/router';
import { UserRouteAccessService } from 'app/core/auth/user-route-access-service';
import { Observable, of } from 'rxjs';
import { filter, map } from 'rxjs/operators';
Expand All @@ -16,7 +16,7 @@ import { CourseGroupComponent } from 'app/course/manage/course-group.component';
export class CourseResolve implements Resolve<Course> {
constructor(private service: CourseManagementService) {}

resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Course> {
resolve(route: ActivatedRouteSnapshot): Observable<Course> {
const id = route.params['courseId'] ? route.params['courseId'] : null;
if (id) {
return this.service.find(id).pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ export class CourseManagementService {
}

private reconnectObjects(res: EntityArrayResponseType): EntityArrayResponseType {
if (res.body) {
/*if (res.body) {
res.body.forEach((course: Course) => {
// TODO: implement
});
}
}*/
return res;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class CourseUpdateComponent implements OnInit {

private subscribeToSaveResponse(result: Observable<HttpResponse<Course>>) {
result.subscribe(
(res: HttpResponse<Course>) => this.onSaveSuccess(),
() => this.onSaveSuccess(),
(res: HttpErrorResponse) => this.onSaveError(res),
);
}
Expand Down Expand Up @@ -197,7 +197,7 @@ export class CourseUpdateComponent implements OnInit {
this.courseImageFile = null;
this.courseImageFileName = result.path;
},
(error) => {
() => {
this.isUploadingCourseImage = false;
this.courseImageFile = null;
this.courseImageFileName = this.course.courseIcon;
Expand Down
13 changes: 0 additions & 13 deletions src/main/webapp/app/entities/lti-outcome-url.model.ts

This file was deleted.

Loading