Skip to content

Commit

Permalink
refactor(editor): Fix Types issues in @n8n/chat (no-changelog) (#9438)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
  • Loading branch information
OlegIvaniv authored May 17, 2024
1 parent 451e659 commit 4858819
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/@n8n/chat/src/components/Chat.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
// eslint-disable-next-line import/no-unresolved
import Close from 'virtual:icons/mdi/close';
import { computed, nextTick, onMounted } from 'vue';
import Layout from '@n8n/chat/components/Layout.vue';
Expand Down
2 changes: 0 additions & 2 deletions packages/@n8n/chat/src/components/ChatWindow.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<script lang="ts" setup>
// eslint-disable-next-line import/no-unresolved
import IconChat from 'virtual:icons/mdi/chat';
// eslint-disable-next-line import/no-unresolved
import IconChevronDown from 'virtual:icons/mdi/chevron-down';
import { nextTick, ref } from 'vue';
import Chat from '@n8n/chat/components/Chat.vue';
Expand Down
1 change: 0 additions & 1 deletion packages/@n8n/chat/src/components/Input.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
// eslint-disable-next-line import/no-unresolved
import IconSend from 'virtual:icons/mdi/send';
import { computed, onMounted, ref } from 'vue';
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
Expand Down
5 changes: 5 additions & 0 deletions packages/@n8n/chat/src/types/icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module 'virtual:icons/*' {
import { FunctionalComponent, SVGAttributes } from 'vue';
const component: FunctionalComponent<SVGAttributes>;
export default component;
}
1 change: 1 addition & 0 deletions packages/@n8n/chat/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const plugins = [
vue(),
icons({
compiler: 'vue3',
autoInstall: true,
}),
dts(),
];
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n_io/eslint-config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ const config = (module.exports = {
/**
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md
*/
'import/no-unresolved': 'error',
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],

/**
* https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": ".",
"rootDirs": [".", "../design-system/src", "../@n8n/chat/src"],
"outDir": "dist",
"target": "esnext",
"module": "esnext",
Expand Down
1 change: 1 addition & 0 deletions packages/editor-ui/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const alias = [
const plugins = [
icons({
compiler: 'vue3',
autoInstall: true,
}),
vue(),
];
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4858819

Please sign in to comment.