Skip to content

Commit

Permalink
Fix Linter for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Negashev committed Dec 19, 2024
1 parent 1e1eabf commit c2bcb0a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/lodash": "4.17.5"
},
"icon": "https://raw.githubusercontent.com/Negashev/rancher-vcloud-director-node-driver-ui-plugin/main/pkg/vcd-node-driver/vcd.svg",
"scripts": {
"scripts": {
"dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve",
"build": "./node_modules/.bin/vue-cli-service build",
"clean": "./node_modules/@rancher/shell/scripts/clean",
Expand Down
25 changes: 8 additions & 17 deletions pkg/vcd-node-driver/components/BusyButton.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<script lang="ts">
import { createApp } from 'vue';
const vueApp = createApp({});
export type AsyncButtonCallback = (success: boolean) => void;
interface Data {
busy: boolean
}
export default Vue.extend<Data, any, any, any>({
<script>
export default {
props: {
/**
* Mode maps to keys in asyncButton.* translations
Expand Down Expand Up @@ -45,12 +36,12 @@ export default Vue.extend<Data, any, any, any>({
},
},
data(): {busy: boolean} {
data() {
return { busy: false };
},
computed: {
displayLabel(): string {
displayLabel() {
if (this.labelKey) {
const t = this.$store.getters['i18n/t'];
Expand All @@ -62,7 +53,7 @@ export default Vue.extend<Data, any, any, any>({
},
methods: {
clicked($event: MouseEvent) {
clicked($event) {
if ($event) {
$event.stopPropagation();
$event.preventDefault();
Expand All @@ -72,7 +63,7 @@ export default Vue.extend<Data, any, any, any>({
return;
}
const cb: AsyncButtonCallback = () => {
const cb = () => {
this.busy = false;
};
Expand All @@ -82,10 +73,10 @@ export default Vue.extend<Data, any, any, any>({
},
focus() {
(this.$refs.btn as HTMLElement).focus();
(this.$refs.btn).focus();
}
}
});
};
</script>

<template>
Expand Down
7 changes: 5 additions & 2 deletions pkg/vcd-node-driver/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
"**/*.vue"
],
"exclude": [
"../../node_modules"
"../../node_modules",
"test/**/*.ts",
"**/*.test.ts",
"**/*.spec.ts"
]
}
}
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
]
},
"exclude": [
"node_modules"
"node_modules",
"tests",
"jest.config.js"
]
}
7 changes: 1 addition & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3992,12 +3992,7 @@
dependencies:
"@types/node" "*"

"@types/node@*", "@types/[email protected]", "@types/node@^14.14.31", "@types/node@^16":
version "16.18.112"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.112.tgz#efd468e4edd08404eed23b6aed6c2f35edfa9450"
integrity sha512-EKrbKUGJROm17+dY/gMi31aJlGLJ75e1IkTojt9n6u+hnaTBDs+M1bIdOawpk2m6YUAXq/R2W0SxCng1tndHCg==

"@types/node@~20.10.0":
"@types/node@*", "@types/[email protected]", "@types/node@^14.14.31", "@types/node@~20.10.0":
version "20.10.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.8.tgz#f1e223cbde9e25696661d167a5b93a9b2a5d57c7"
integrity sha512-f8nQs3cLxbAFc00vEU59yf9UyGUftkPaLGfvbVOIDdx2i1b8epBqj2aNGyP19fiyXWvlmZ7qC1XLjAzw/OKIeA==
Expand Down

0 comments on commit c2bcb0a

Please sign in to comment.