Skip to content

Commit 95b585a

Browse files
fix lint errors in Vue demo
1 parent 8a10dc6 commit 95b585a

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

apps/demos/Demos/Chat/AIAndChatbotIntegration/Vue/App.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ onBeforeMount(() => {
8080
8181
async function getAIResponse(messages: DxChatTypes.Message[]): Promise<string> {
8282
const params: Record<string, any> = {
83-
messages: messages,
83+
messages,
8484
model: AzureOpenAIConfig.deployment,
8585
max_tokens: 1000,
8686
temperature: 0.7,
@@ -160,20 +160,20 @@ function alertLimitReached(): void {
160160
async function regenerate(): Promise<void> {
161161
toggleDisabledState(true);
162162
const lastMessage = messages.at(-1);
163-
163+
164164
try {
165165
const aiResponse = await getAIResponse(messages.slice(0, -1));
166166
167167
updateLastMessage(aiResponse);
168-
168+
169169
if (lastMessage?.content) {
170170
lastMessage.content = aiResponse;
171171
}
172172
} catch {
173173
if (lastMessage?.content) {
174174
updateLastMessage(lastMessage.content);
175175
}
176-
176+
177177
alertLimitReached();
178178
} finally {
179179
toggleDisabledState(false);

apps/demos/Demos/Chat/MessageEditing/Vue/App.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ const store = [...initialMessages];
6161
6262
const customStore = new CustomStore({
6363
key: 'id',
64-
load: async() => store,
65-
insert: async(message: DxChatTypes.Message) => {
64+
load: async () => store,
65+
insert: async (message: DxChatTypes.Message) => {
6666
store.push(message);
6767
return message;
6868
},
@@ -113,12 +113,12 @@ const editingStrategy: Record<string, boolean | ((options: CustomStrategyOptions
113113
disabled: false,
114114
custom: ({ component, message }: CustomStrategyOptions) => {
115115
if (!component) return false;
116-
116+
117117
const { items, user } = component.option();
118118
const userId = user?.id;
119119
120120
const lastNotDeletedMessage = items?.findLast(
121-
(item: DxChatTypes.Message) => item.author?.id === userId && !item.isDeleted
121+
(item: DxChatTypes.Message) => item.author?.id === userId && !item.isDeleted,
122122
);
123123
124124
return message.id === lastNotDeletedMessage?.id;

apps/demos/Demos/Diagram/ItemSelection/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function onSelectionChanged({ items }: DxDiagramTypes.SelectionChangedEvent) {
5757
selectedItemNames.value = 'Nobody has been selected';
5858
const filteredItems = items
5959
.filter((item) => item.itemType === 'shape')
60-
.map(({text}: Record<string, any>) => text);
60+
.map(({ text }: Record<string, any>) => text);
6161
if (filteredItems.length > 0) {
6262
selectedItemNames.value = filteredItems.join(', ');
6363
}

apps/demos/Demos/DropDownButton/Overview/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function onColorClick(clickedColor: string) {
184184
color.value = clickedColor;
185185
if (colorPicker) {
186186
(colorPicker.element().getElementsByClassName('dx-icon-square')[0] as HTMLElement).style.color = clickedColor;
187-
colorPicker.close();
187+
colorPicker.close();
188188
}
189189
}
190190
</script>

apps/demos/Demos/FileManager/CustomThumbnails/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<script setup lang="ts">
2121
import { DxFileManager, DxPermissions, DxItemView } from 'devextreme-vue/file-manager';
22-
import FileSystemItem from "devextreme/file_management/file_system_item";
22+
import FileSystemItem from 'devextreme/file_management/file_system_item';
2323
import { fileItems } from './data.ts';
2424
2525
function customizeIcon(fileSystemItem: FileSystemItem) {

apps/demos/Demos/Form/Adaptability/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const colCountByScreen = computed(() => (calculateColCountAutomatically.value
3535
md: 4,
3636
}));
3737
38-
const screenByWidth = ((width: number) => (width < 720 ? 'sm' : 'md')) as unknown as () => void ;
38+
const screenByWidth = ((width: number) => (width < 720 ? 'sm' : 'md')) as unknown as () => void;
3939
</script>
4040
<style scoped>
4141
#form {

apps/demos/Demos/Form/UpdateItemsDynamically/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import {
6363
DxButtonItem,
6464
DxLabel,
6565
} from 'devextreme-vue/form';
66-
import { type DxCheckBoxTypes } from "devextreme-vue/check-box";
66+
import { type DxCheckBoxTypes } from 'devextreme-vue/check-box';
6767
import service from './data.ts';
6868
6969
const employee = service.getEmployee();

apps/demos/Demos/Form/Validation/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ function handleSubmit(e: Event) {
346346
}, 'success', 3000);
347347
e.preventDefault();
348348
}
349-
const sendRequest = function(value: string) {
349+
const sendRequest = function (value: string) {
350350
const invalidEmail = '[email protected]';
351351
return new Promise((resolve) => {
352352
setTimeout(() => {

apps/demos/Demos/Gantt/ExportToPDF/Vue/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ import {
158158
DxItem,
159159
} from 'devextreme-vue/gantt';
160160
import DxCheckBox from 'devextreme-vue/check-box';
161-
import DxNumberBox, {type DxNumberBoxTypes } from 'devextreme-vue/number-box';
161+
import DxNumberBox, { type DxNumberBoxTypes } from 'devextreme-vue/number-box';
162162
import DxDateBox from 'devextreme-vue/date-box';
163163
import DxSelectBox, { type DxSelectBoxTypes } from 'devextreme-vue/select-box';
164164
import { jsPDF } from 'jspdf';

apps/demos/Demos/HtmlEditor/AITextEditing/Vue/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
DxCommand,
3535
} from 'devextreme-vue/html-editor';
3636
import { AIIntegration, type Response } from 'devextreme-vue/common/ai-integration';
37-
import { AzureOpenAI, OpenAI } from 'openai';
37+
import { AzureOpenAI, OpenAI } from 'openai';
3838
import {
3939
markup,
4040
AzureOpenAIConfig,
@@ -66,15 +66,15 @@ const aiIntegration = new AIIntegration({
6666
sendRequest({ prompt }) {
6767
const controller = new AbortController();
6868
const signal = controller.signal;
69-
69+
7070
const aiPrompt: AIMessage[] = [
7171
{ role: 'system', content: prompt.system || '' },
7272
{ role: 'user', content: prompt.user || '' },
7373
];
7474
7575
const promise = getAIResponse(aiPrompt, signal);
7676
77-
const result: Response = {
77+
const result: Response = {
7878
promise,
7979
abort: () => {
8080
controller.abort();

0 commit comments

Comments
 (0)