chore: fix eslint in blocksuite (#9232)

This commit is contained in:
Saul-Mirone
2024-12-20 16:48:10 +00:00
parent bfcc53dc1f
commit 3a82da0e5b
269 changed files with 935 additions and 842 deletions
@@ -127,7 +127,7 @@ export class AIPanelError extends WithDisposable(LitElement) {
}
`;
private _getResponseGroup = () => {
private readonly _getResponseGroup = () => {
let responseGroup: AIItemGroupConfig[] = [];
const errorType = this.config.error?.type;
if (errorType && errorType !== AIErrorType.GeneralNetworkError) {
@@ -84,7 +84,7 @@ export class AIPanelInput extends WithDisposable(LitElement) {
}
`;
private _onInput = () => {
private readonly _onInput = () => {
this.textarea.style.height = 'auto';
this.textarea.style.height = this.textarea.scrollHeight + 'px';
@@ -99,14 +99,14 @@ export class AIPanelInput extends WithDisposable(LitElement) {
}
};
private _onKeyDown = (e: KeyboardEvent) => {
private readonly _onKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) {
e.preventDefault();
this._sendToAI();
}
};
private _sendToAI = () => {
private readonly _sendToAI = () => {
const value = this.textarea.value.trim();
if (value.length === 0) return;