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

fix: ESLint issues in bobuilder-core #4827

Merged
merged 8 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
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
10 changes: 0 additions & 10 deletions libraries/botbuilder-core/eslint.config.cjs

This file was deleted.

1 change: 0 additions & 1 deletion libraries/botbuilder-core/etc/botbuilder-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ export class SkypeMentionNormalizeMiddleware implements Middleware {
export interface StatePropertyAccessor<T = any> {
delete(context: TurnContext): Promise<void>;
get(context: TurnContext): Promise<T | undefined>;
// (undocumented)
get(context: TurnContext, defaultValue: T): Promise<T>;
set(context: TurnContext, value: T): Promise<void>;
}
Expand Down
3 changes: 1 addition & 2 deletions libraries/botbuilder-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"botbuilder-stdlib": "4.1.6",
"botframework-connector": "4.1.6",
"botframework-schema": "4.1.6",
"eslint-plugin-only-warn": "^1.1.0",
"uuid": "^10.0.0",
"zod": "^3.23.8"
},
Expand All @@ -46,7 +45,7 @@
"build:rollup": "yarn clean && yarn build && api-extractor run --verbose --local",
"clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo",
"depcheck": "depcheck --config ../../.depcheckrc",
"lint": "eslint .",
"lint": "eslint . --config ../../eslint.config.cjs",
"postbuild": "downlevel-dts lib _ts3.4/lib --checksum",
"test": "npm-run-all build test:mocha",
"test:compat": "api-extractor run --verbose",
Expand Down
39 changes: 8 additions & 31 deletions libraries/botbuilder-core/src/activityHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Called to initiate the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Typically, you would provide this method as the function handler that the adapter calls
* to perform the bot's logic after the received activity has been pre-processed by the adapter
Expand All @@ -451,7 +450,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Called at the start of the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to use custom logic for emitting events.
*
Expand All @@ -468,7 +466,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _message_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -484,7 +481,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _message update_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -502,7 +498,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _message delete_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand Down Expand Up @@ -568,7 +563,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Handle _signin invoke activity type_.
*
* @param _context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*/
Expand All @@ -585,7 +579,7 @@ export class ActivityHandler extends ActivityHandlerBase {
*/
protected onAdaptiveCardInvoke(
_context: TurnContext,
_invokeValue: AdaptiveCardInvokeValue
_invokeValue: AdaptiveCardInvokeValue,
): Promise<AdaptiveCardInvokeResponse> {
return Promise.reject(new InvokeException(StatusCodes.NOT_IMPLEMENTED));
}
Expand All @@ -605,7 +599,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _endOfConversation_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -621,7 +614,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _typing_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -637,7 +629,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _instllationupdate_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand Down Expand Up @@ -673,7 +664,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs the _installation update_ sub-type handlers, as appropriate, and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels or to add
* custom conversation update sub-type events.
Expand All @@ -700,7 +690,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _installation update add_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -716,7 +705,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _installation update remove_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -732,7 +720,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _unrecognized activity type_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -750,7 +737,7 @@ export class ActivityHandler extends ActivityHandlerBase {
const response = this.createAdaptiveCardInvokeErrorResponse(
StatusCodes.BAD_REQUEST,
'BadRequest',
'Missing value property for search'
'Missing value property for search',
);

throw new InvokeException(StatusCodes.BAD_REQUEST, response);
Expand All @@ -763,7 +750,7 @@ export class ActivityHandler extends ActivityHandlerBase {
const response = this.createAdaptiveCardInvokeErrorResponse(
StatusCodes.BAD_REQUEST,
'BadRequest',
'Missing kind property for search.'
'Missing kind property for search.',
);

throw new InvokeException(StatusCodes.BAD_REQUEST, response);
Expand All @@ -774,7 +761,7 @@ export class ActivityHandler extends ActivityHandlerBase {
const response = this.createAdaptiveCardInvokeErrorResponse(
StatusCodes.BAD_REQUEST,
'BadRequest',
'Missing queryText for search.'
'Missing queryText for search.',
);

throw new InvokeException(StatusCodes.BAD_REQUEST, response);
Expand All @@ -789,7 +776,7 @@ export class ActivityHandler extends ActivityHandlerBase {
const response = this.createAdaptiveCardInvokeErrorResponse(
StatusCodes.BAD_REQUEST,
'BadRequest',
'Missing value property'
'Missing value property',
);

throw new InvokeException(StatusCodes.BAD_REQUEST, response);
Expand All @@ -799,7 +786,7 @@ export class ActivityHandler extends ActivityHandlerBase {
const response = this.createAdaptiveCardInvokeErrorResponse(
StatusCodes.BAD_REQUEST,
'NotSupported',
`The action '${value.action.type}' is not supported.`
`The action '${value.action.type}' is not supported.`,
);

throw new InvokeException(StatusCodes.BAD_REQUEST, response);
Expand Down Expand Up @@ -828,7 +815,7 @@ export class ActivityHandler extends ActivityHandlerBase {
private createAdaptiveCardInvokeErrorResponse(
statusCode: StatusCodes,
code: string,
message: string
message: string,
): AdaptiveCardInvokeResponse {
return {
statusCode,
Expand All @@ -841,7 +828,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _conversation update_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -860,7 +846,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs the _conversation update_ sub-type handlers, as appropriate, and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels or to add
* custom conversation update sub-type events.
Expand All @@ -884,7 +869,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs the _message update_ sub-type handlers, as appropriate, and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels or to add
* custom conversation update sub-type events.
Expand All @@ -899,7 +883,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs the _message delete_ sub-type handlers, as appropriate, and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels or to add
* custom conversation update sub-type events.
Expand All @@ -913,7 +896,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered _message reaction_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -933,7 +915,6 @@ export class ActivityHandler extends ActivityHandlerBase {
*
* @param reactionsAdded The list of reactions added.
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -950,7 +931,6 @@ export class ActivityHandler extends ActivityHandlerBase {
*
* @param reactionsRemoved The list of reactions removed.
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -960,7 +940,7 @@ export class ActivityHandler extends ActivityHandlerBase {
*/
protected async onReactionsRemovedActivity(
reactionsRemoved: MessageReaction[],
context: TurnContext
context: TurnContext,
): Promise<void> {
await this.handle(context, 'ReactionsRemoved', this.defaultNextEvent(context));
}
Expand All @@ -969,7 +949,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs the _message reaction_ sub-type handlers, as appropriate, and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels or to add
* custom message reaction sub-type events.
Expand All @@ -991,7 +970,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs all registered event_ handlers and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels.
*
Expand All @@ -1010,7 +988,6 @@ export class ActivityHandler extends ActivityHandlerBase {
* Runs the _event_ sub-type handlers, as appropriate, and then continues the event emission process.
*
* @param context The context object for the current turn.
*
* @remarks
* Override this method to support channel-specific behavior across multiple channels or to add custom event sub-type events.
* For certain channels, such as Web Chat and custom Direct Line clients, developers can emit custom event activities from the client.
Expand Down
Loading
Loading