Skip to content

Commit

Permalink
ESLint, update vite to 5.0.0 and other dependencies (#63)
Browse files Browse the repository at this point in the history
* Update vite to 5.0.0 and other dependencies

* Eslint

* Update workflow
  • Loading branch information
louislam authored Nov 18, 2023
1 parent 5ce6b90 commit 13c3dac
Show file tree
Hide file tree
Showing 13 changed files with 447 additions and 83 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ module.exports = {
"one-var": [ "error", "never" ],
"max-statements-per-line": [ "error", { "max": 1 }],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": [ "warn", {
"args": "none"
}],
"prefer-const" : "off",
},
};
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18.x, 20.x] # Can be changed
node: [20.x] # Can be changed
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4

- run: git config --global core.autocrlf false # Mainly for Windows
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion backend/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class Database {
* @param {boolean} noLog Should logs not be output?
* @returns {Promise<void>}
*/
static async connect(autoloadModels = true, noLog = false) {
static async connect(autoloadModels = true) {
const acquireConnectionTimeout = 120 * 1000;
let dbConfig;
try {
Expand Down
2 changes: 1 addition & 1 deletion backend/dockge-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export class DockgeServer {
}

// Run every 5 seconds
const job = Cron("*/2 * * * * *", {
Cron("*/2 * * * * *", {
protect: true, // Enabled over-run protection.
}, () => {
log.debug("server", "Cron job running");
Expand Down
1 change: 0 additions & 1 deletion backend/socket-handlers/main-socket-handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { SocketHandler } from "../socket-handler.js";
import { Socket } from "socket.io";
import { DockgeServer } from "../dockge-server";
import { log } from "../log";
import { R } from "redbean-node";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ArraySelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<li v-for="(value, index) in array" :key="index" class="list-group-item">
<select v-model="array[index]" class="no-bg domain-input">
<option value="">Select a network...</option>
<option v-for="option in options" :value="option">{{ option }}</option>
<option v-for="option in options" :key="option" :value="option">{{ option }}</option>
</select>

<font-awesome-icon icon="times" class="action remove ms-2 me-3 text-danger" @click="remove(index)" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div v-if="!isEditMode">
<span class="badge me-1" :class="bgStyle">{{ status }}</span>

<a v-for="port in service.ports" :href="parsePort(port).url" target="_blank">
<a v-for="port in service.ports" :key="port" :href="parsePort(port).url" target="_blank">
<span class="badge me-1 bg-secondary">{{ parsePort(port).display }}</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/NetworkInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class="form-control"
@keyup.enter="createExternelNetwork"
/>
<button class="btn btn-normal btn-sm me-2" type="button" @click="">
<button class="btn btn-normal btn-sm me-2" type="button">
{{ $t("createExternalNetwork") }}
</button>
</div>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Uptime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default {
computed: {
uptime() {
return "0.00%";
return this.$t("notAvailableShort");
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/settings/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
</template>

<script>
import HiddenInput from "../../components/HiddenInput.vue";
import dayjs from "dayjs";
import { timezoneList } from "../../util-frontend";
export default {
components: {
HiddenInput,
},
data() {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
/// <reference types="vite/client" />

declare module "*.vue" {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"mark-as-nightly": "tsx ./extra/mark-as-nightly.ts"
},
"dependencies": {
"@fontsource/jetbrains-mono": "^5.0.17",
"@homebridge/node-pty-prebuilt-multiarch": "~0.11.10",
"@homebridge/node-pty-prebuilt-multiarch": "~0.11.11",
"@louislam/sqlite3": "~15.1.6",
"bcryptjs": "~2.4.3",
"check-password-strength": "~2.0.7",
Expand All @@ -45,6 +44,7 @@
"yaml": "~2.3.4"
},
"devDependencies": {
"@fontsource/jetbrains-mono": "^5.0.17",
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-regular-svg-icons": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
Expand All @@ -55,7 +55,7 @@
"@types/jsonwebtoken": "~9.0.5",
"@typescript-eslint/eslint-plugin": "~6.8.0",
"@typescript-eslint/parser": "~6.8.0",
"@vitejs/plugin-vue": "~4.3.4",
"@vitejs/plugin-vue": "~4.5.0",
"bootstrap": "5.3.2",
"bootstrap-vue-next": "~0.14.10",
"cross-env": "~7.0.3",
Expand All @@ -66,7 +66,7 @@
"sass": "~1.68.0",
"typescript": "~5.2.2",
"unplugin-vue-components": "~0.25.2",
"vite": "~4.5.0",
"vite": "~5.0.0",
"vite-plugin-compression": "~0.5.1",
"vue": "~3.3.8",
"vue-eslint-parser": "~9.3.2",
Expand Down
Loading

0 comments on commit 13c3dac

Please sign in to comment.