Skip to content

Commit e673222

Browse files
author
danhnguyen
committed
♻️ refactor: improve Popup component show/hide logic and update ESLint configuration
1 parent 6a73f95 commit e673222

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"vue/multi-word-component-names": "off",
2424
"vue/valid-template-root": "off",
2525
"unused-imports/no-unused-imports": "warn",
26-
"vue/require-default-prop": "off"
26+
"vue/require-default-prop": "off",
27+
"@typescript-eslint/no-empty-object-type": "off"
2728
}
2829
}

examples/types/module.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
declare module '*.vue' {
2-
import { DefineComponent } from 'vue'
3-
// eslint-disable-next-line @typescript-eslint/ban-types
4-
const Component: DefineComponent<{}, {}, any>
5-
export default Component
2+
import { DefineComponent } from 'vue';
3+
const Component: DefineComponent<{}, {}, any>;
4+
export default Component;
65
}

libs/components/Popup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ const { setLngLat, show, hide } = useCreatePopup({
9898
watch(
9999
() => props.show,
100100
(isShow) => {
101-
isShow ? show() : hide();
101+
if (isShow) show();
102+
else hide();
102103
},
103104
);
104105

types/module.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
declare module '*.vue' {
2-
import { DefineComponent } from 'vue'
3-
// eslint-disable-next-line @typescript-eslint/ban-types
4-
const Component: DefineComponent<{}, {}, any>
5-
export default Component
2+
import { DefineComponent } from 'vue';
3+
const Component: DefineComponent<{}, {}, any>;
4+
export default Component;
65
}

0 commit comments

Comments
 (0)