Skip to content

Commit

Permalink
Fix common linter errors for web-pubsub (#17299)
Browse files Browse the repository at this point in the history
* Fix @azure/azure-sdk/ts-package-json-keywords failure

* Fix tsdoc/syntax errors for @param tag

* Fix tsdoc/syntax error for usage of @ for non tag

* Run lint:fix

* Update lintreport name
  • Loading branch information
ramya-rao-a authored Aug 27, 2021
1 parent 28e6a57 commit bb137b0
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 86 deletions.
4 changes: 2 additions & 2 deletions sdk/web-pubsub/web-pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"integration-test:node": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o signalr-lintReport.html || exit 0",
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o webpubsub-lintReport.html || exit 0",
"pack": "npm pack 2>&1",
"test:browser": "echo \"Browser is not supported.\" && exit 0",
"test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node",
Expand Down Expand Up @@ -57,7 +57,7 @@
},
"repository": "github:Azure/azure-sdk-for-js",
"keywords": [
"Azure",
"azure",
"cloud"
],
"author": "Microsoft Corporation",
Expand Down
56 changes: 28 additions & 28 deletions sdk/web-pubsub/web-pubsub/src/groupClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,54 +84,54 @@ export interface WebPubSubGroup {
/**
* Add a specific connection to this group
*
* @param connectionId The connection id to add to this group
* @param options Additional options
* @param connectionId - The connection id to add to this group
* @param options - Additional options
*/
addConnection(connectionId: string, options?: GroupAddConnectionOptions): Promise<void>;

/**
* Remove a specific connection from this group
*
* @param connectionId The connection id to remove from this group
* @param options Additional options
* @param connectionId - The connection id to remove from this group
* @param options - Additional options
*/
removeConnection(connectionId: string, options?: GroupRemoveConnectionOptions): Promise<void>;

/**
* Add a user to this group
*
* @param username The user name to add
* @param options Additional options
* @param username - The user name to add
* @param options - Additional options
*/
addUser(username: string, options?: GroupAddUserOptions): Promise<void>;

/**
* Remove a user from this group
*
* @param username The user name to remove
* @param options Additional options
* @param username - The user name to remove
* @param options - Additional options
*/
removeUser(username: string, options?: GroupRemoveUserOptions): Promise<void>;

/**
* Send a text message to every connection in this group
*
* @param message The message to send
* @param options Additional options
* @param message - The message to send
* @param options - Additional options
*/
sendToAll(message: string, options: GroupSendTextToAllOptions): Promise<void>;
/**
* Send a json message to every connection in this group
*
* @param message The message to send
* @param options Additional options
* @param message - The message to send
* @param options - Additional options
*/
sendToAll(message: JSONTypes, options?: GroupSendToAllOptions): Promise<void>;
/**
* Send a binary message to every connection in this group
*
* @param message The binary message to send
* @param options Additional options
* @param message - The binary message to send
* @param options - Additional options
*/
sendToAll(message: RequestBodyType, options?: GroupSendToAllOptions): Promise<void>;
}
Expand Down Expand Up @@ -174,8 +174,8 @@ export class WebPubSubGroupImpl implements WebPubSubGroup {
/**
* Add a specific connection to this group
*
* @param connectionId The connection id to add to this group
* @param options Additional options
* @param connectionId - The connection id to add to this group
* @param options - Additional options
*/
public async addConnection(
connectionId: string,
Expand Down Expand Up @@ -214,8 +214,8 @@ export class WebPubSubGroupImpl implements WebPubSubGroup {
/**
* Remove a specific connection from this group
*
* @param connectionId The connection id to remove from this group
* @param options Additional options
* @param connectionId - The connection id to remove from this group
* @param options - Additional options
*/
public async removeConnection(
connectionId: string,
Expand All @@ -241,8 +241,8 @@ export class WebPubSubGroupImpl implements WebPubSubGroup {
/**
* Add a user to this group
*
* @param username The user name to add
* @param options Additional options
* @param username - The user name to add
* @param options - Additional options
*/
public async addUser(username: string, options: GroupAddUserOptions = {}): Promise<void> {
const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-addUser", options);
Expand All @@ -262,8 +262,8 @@ export class WebPubSubGroupImpl implements WebPubSubGroup {
/**
* Remove a user from this group
*
* @param username The user name to remove
* @param options Additional options
* @param username - The user name to remove
* @param options - Additional options
*/
public async removeUser(username: string, options: GroupRemoveUserOptions = {}): Promise<void> {
const { span, updatedOptions } = createSpan("WebPubSubServiceClient-group-removeUser", options);
Expand All @@ -283,22 +283,22 @@ export class WebPubSubGroupImpl implements WebPubSubGroup {
/**
* Send a text message to every connection in this group
*
* @param message The message to send
* @param options Additional options
* @param message - The message to send
* @param options - Additional options
*/
public async sendToAll(message: string, options: GroupSendTextToAllOptions): Promise<void>;
/**
* Send a json message to every connection in this group
*
* @param message The message to send
* @param options Additional options
* @param message - The message to send
* @param options - Additional options
*/
public async sendToAll(message: JSONTypes, options?: GroupSendToAllOptions): Promise<void>;
/**
* Send a binary message to every connection in this group
*
* @param message The binary message to send
* @param options Additional options
* @param message - The binary message to send
* @param options - Additional options
*/
public async sendToAll(message: RequestBodyType, options?: GroupSendToAllOptions): Promise<void>;

Expand Down
Loading

0 comments on commit bb137b0

Please sign in to comment.