Skip to content
This repository was archived by the owner on Mar 18, 2023. It is now read-only.

Commit 914a097

Browse files
committed
chore(lint): add TSDoc to eslint config
Closes: #107
1 parent 385bd39 commit 914a097

File tree

13 files changed

+180
-21
lines changed

13 files changed

+180
-21
lines changed

.eslintrc.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,22 @@
1515
],
1616
"createDefaultProgram": true
1717
},
18+
"plugins": [
19+
"@typescript-eslint/eslint-plugin",
20+
"eslint-plugin-tsdoc"
21+
],
1822
"extends": [
1923
"plugin:@angular-eslint/recommended",
2024
"plugin:@angular-eslint/template/process-inline-templates",
2125
"eslint:recommended",
2226
"plugin:@typescript-eslint/recommended",
2327
"plugin:@typescript-eslint/recommended-requiring-type-checking",
24-
"plugin:prettier/recommended"
28+
"plugin:prettier/recommended",
29+
"plugin:@typescript-eslint/recommended"
2530
],
2631
"rules": {
27-
"@typescript-eslint/no-empty-function": "off"
32+
"@typescript-eslint/no-empty-function": "off",
33+
"tsdoc/syntax": "warn"
2834
}
2935
},
3036
// NOTE: WE ARE NOT APPLYING PRETTIER IN THIS OVERRIDE, ONLY @ANGULAR-ESLINT/TEMPLATE

cypress/plugins/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2022 Scheer PAS Schweiz AG
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* imitations under the License.
15+
*/
16+
117
/// <reference types="cypress" />
218
// ***********************************************************
319
// This example plugins/index.ts can be used to load plugins
@@ -12,6 +28,8 @@
1228
// This function is called when a project is opened or re-opened (e.g. due to
1329
// the project's config changing)
1430

31+
/* eslint-disable tsdoc/syntax */
32+
1533
/**
1634
* @type {Cypress.PluginConfig}
1735
*/

package-lock.json

Lines changed: 134 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"eslint": "8.14.0",
6161
"eslint-config-prettier": "8.5.0",
6262
"eslint-plugin-prettier": "4.0.0",
63+
"eslint-plugin-tsdoc": "^0.2.16",
6364
"jasmine-core": "4.1.0",
6465
"karma": "6.3.19",
6566
"karma-chrome-launcher": "3.1.1",

src/app/components/marketplace-client-app/marketplace-client-app.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ export class MarketplaceClientAppComponent implements OnInit {
109109
/**
110110
* Try to create a user organization every time.
111111
* Refactor this later to accept org-names
112-
* @private
113112
*/
114113
private createOrgAndLoadClients() {
115114
this.orgService
@@ -159,7 +158,7 @@ export class MarketplaceClientAppComponent implements OnInit {
159158
* the client already exists
160159
* there are multiple orgs and no org is selected
161160
*
162-
* @return true if the create client button should be disabled
161+
* @returns true if the create client button should be disabled
163162
*/
164163
public isCreateButtonDisabled(): boolean {
165164
return (

src/app/components/my-apps/my-apps.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,8 @@ export class MyAppsComponent implements OnInit {
268268
}
269269

270270
/**
271-
* Contracts will be stored in a map with schema {client.name:contract.version,contract-object}
272-
* @param contracts
273-
* @private
271+
* Contracts will be stored in a map with schema "\{client.name:contract.version,contract-object\}"
272+
* @param contracts - array of extended contracts
274273
*/
275274
private extractContracts(contracts: IContractExt[]) {
276275
this.contracts = this.contracts.concat(contracts);

src/app/interfaces/ICommunication.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* imitations under the License.
1515
*/
1616

17+
/* eslint-disable tsdoc/syntax */
1718
import { IPolicyExt } from './IPolicy';
1819

1920
export interface IAction {

src/app/services/api/api.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ export class ApiService {
152152
/**
153153
* This method will create and name the definition file and creates the download
154154
* The name pattern is: apiName-apiVersion.fileEnding e.g. Petstore-1.0.json
155-
* @param data the definition as blob
156-
* @param apiId the name of the API
157-
* @param apiVersion the version of the API
158-
* @param definitionType the definition type of the API (SwaggerJSON, SwaggerYAML, WSDL)
155+
* @param data - the definition as blob
156+
* @param apiId - the name of the API
157+
* @param apiVersion - the version of the API
158+
* @param definitionType - the definition type of the API (SwaggerJSON, SwaggerYAML, WSDL)
159159
*/
160160
private downloadFile(
161161
data: Blob,

src/app/services/permissions/permissions.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class PermissionsService {
4242

4343
/**
4444
* This will return an array of organizationIds where the permission applies
45-
* @param requestedPermission the permission to be checked
45+
* @param requestedPermission - the permission to be checked
4646
*/
4747
public getAllowedOrganizations(requestedPermission: IPermission): string[] {
4848
const organizations: string[] = [];

src/app/services/policy/policy.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,8 @@ export class PolicyService {
405405
/**
406406
* The function calculates in reference to the max value of a policy the remaining time
407407
* Schema: ([max value in sec] - [remaining time in sec]) / [max value in sec] * [unit multiplier]
408-
* @param timeUnitData
409-
* @param reset the value once the policy will reset the current value in seconds
410-
* @private
408+
* @param timeUnitData - the time unit the policy applies for
409+
* @param reset - the value once the policy will reset the current value in seconds
411410
*/
412411
private calcCurrentTimeValue(
413412
timeUnitData: ITimeUnitData,

0 commit comments

Comments
 (0)