Skip to content

Commit 51a5383

Browse files
authored
Make the protobuf object literal lint check an error instead of a warning. (RooCodeInc#4019)
Fix remaining occurences of protobuf literals.
1 parent a6ce75d commit 51a5383

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"no-throw-literal": "warn",
2121
"semi": "off",
2222
"react-hooks/exhaustive-deps": "off",
23-
"eslint-rules/no-protobuf-object-literals": "warn",
23+
"eslint-rules/no-protobuf-object-literals": "error",
2424
"eslint-rules/no-grpc-client-object-literals": "error"
2525
},
2626
"ignorePatterns": ["out", "dist", "**/*.d.ts"]

src/core/controller/ui/subscribeToChatButtonClicked.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const activeChatButtonClickedSubscriptions = new Map<string, StreamingResponseHa
1515
*/
1616
export async function subscribeToChatButtonClicked(
1717
controller: Controller,
18-
request: EmptyRequest,
18+
_request: EmptyRequest,
1919
responseStream: StreamingResponseHandler,
2020
requestId?: string,
2121
): Promise<void> {
@@ -50,7 +50,7 @@ export async function sendChatButtonClickedEvent(controllerId: string): Promise<
5050
}
5151

5252
try {
53-
const event: Empty = {}
53+
const event: Empty = Empty.create({})
5454
await responseStream(
5555
event,
5656
false, // Not the last message

src/core/controller/ui/subscribeToHistoryButtonClicked.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const activeHistoryButtonClickedSubscriptions = new Map<StreamingResponseHandler
1414
* @param requestId The ID of the request (passed by the gRPC handler)
1515
*/
1616
export async function subscribeToHistoryButtonClicked(
17-
controller: Controller,
17+
_controller: Controller,
1818
request: WebviewProviderTypeRequest,
1919
responseStream: StreamingResponseHandler,
2020
requestId?: string,
@@ -50,7 +50,7 @@ export async function sendHistoryButtonClickedEvent(webviewType?: WebviewProvide
5050
}
5151

5252
try {
53-
const event: Empty = {}
53+
const event: Empty = Empty.create({})
5454
await responseStream(
5555
event,
5656
false, // Not the last message

src/core/controller/ui/subscribeToMcpButtonClicked.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const mcpButtonClickedSubscriptions = new Map<StreamingResponseHandler, WebviewP
1414
* @param requestId The ID of the request (passed by the gRPC handler)
1515
*/
1616
export async function subscribeToMcpButtonClicked(
17-
controller: Controller,
17+
_controller: Controller,
1818
request: WebviewProviderTypeRequest,
1919
responseStream: StreamingResponseHandler,
2020
requestId?: string,
@@ -41,7 +41,7 @@ export async function subscribeToMcpButtonClicked(
4141
* @param webviewType The type of webview that triggered the event (SIDEBAR or TAB)
4242
*/
4343
export async function sendMcpButtonClickedEvent(webviewType?: WebviewProviderType): Promise<void> {
44-
const event: Empty = {}
44+
const event: Empty = Empty.create({})
4545

4646
// Process all subscriptions, filtering based on the source
4747
const promises = Array.from(mcpButtonClickedSubscriptions.entries()).map(async ([responseStream, providerType]) => {

0 commit comments

Comments
 (0)