Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency eslint to v9 #3594

Merged
merged 31 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bb49ff9
Update to eslint 9
qwerty287 Apr 10, 2024
fbef100
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Apr 15, 2024
b3e4c43
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Apr 19, 2024
263d759
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Apr 25, 2024
c57f4dd
Merge branch 'main' into renovate/eslint-9.x
qwerty287 May 1, 2024
62d2e78
Merge branch 'main' into renovate/eslint-9.x
qwerty287 May 23, 2024
97a0ebf
Merge remote-tracking branch 'upstream/main' into renovate/eslint-9.x
anbraten May 27, 2024
7da0645
Merge remote-tracking branch 'upstream/main' into renovate/eslint-9.x
anbraten May 28, 2024
bac7e34
update config
anbraten May 28, 2024
22c1d55
Merge branch 'main' into renovate/eslint-9.x
qwerty287 May 30, 2024
e3bec7e
Add some more configs back
qwerty287 May 30, 2024
8f3357d
run autofix
qwerty287 May 30, 2024
327302b
fix most issues
qwerty287 May 30, 2024
a30885b
[pre-commit.ci] auto fixes from pre-commit.com hooks [CI SKIP]
pre-commit-ci[bot] May 30, 2024
c0ce86c
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Jun 1, 2024
68f7000
Add @ianvs/prettier-plugin-sort-imports
qwerty287 Jun 1, 2024
eb1b971
Fix spellcheck
qwerty287 Jun 1, 2024
cac497d
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Jun 5, 2024
73152e2
fix lint
qwerty287 Jun 5, 2024
a705145
update
qwerty287 Jun 5, 2024
d825f17
fix prettier
qwerty287 Jun 5, 2024
babc4f8
fix eslint/prettier working differently
qwerty287 Jun 5, 2024
f5cecfd
fix some lints
qwerty287 Jun 5, 2024
5be3a7c
Merge branch 'main' into renovate/eslint-9.x
qwerty287 Jun 6, 2024
2798d1a
Merge remote-tracking branch 'upstream/main' into renovate/eslint-9.x
anbraten Jun 6, 2024
e2a0332
Merge branch 'renovate/eslint-9.x' of github.com:woodpecker-ci/woodpe…
anbraten Jun 6, 2024
c032751
fix lint
anbraten Jun 6, 2024
29071f8
adjust import sorting
anbraten Jun 6, 2024
cb41c5e
fix imports
anbraten Jun 6, 2024
2f587e5
fix ts
anbraten Jun 6, 2024
7a87ba9
Merge branch 'main' into renovate/eslint-9.x
anbraten Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix ts
  • Loading branch information
anbraten committed Jun 6, 2024
commit 2f587e51c93a4f9d46eb1fdfeb1c111a7e0d0ca8
2 changes: 1 addition & 1 deletion web/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default antfu(
{
stylistic: false,
typescript: {
tsconfigPath: './tsconfig.eslint.json',
tsconfigPath: './tsconfig.json',
},
vue: true,

Expand Down
4 changes: 2 additions & 2 deletions web/src/components/repo/pipeline/PipelineLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async function download() {
downloadInProgress.value = true;
logs = await apiClient.getLogs(repo.value.id, pipeline.value.number, step.value.id);
} catch (e) {
notifications.notifyError(e, i18n.t('repo.pipeline.log_download_error'));
notifications.notifyError(e as Error, i18n.t('repo.pipeline.log_download_error'));
return;
} finally {
downloadInProgress.value = false;
Expand Down Expand Up @@ -323,7 +323,7 @@ async function deleteLogs() {
await apiClient.deleteLogs(repo.value.id, pipeline.value.number, step.value.id);
log.value = [];
} catch (e) {
notifications.notifyError(e, i18n.t('repo.pipeline.log_delete_error'));
notifications.notifyError(e as Error, i18n.t('repo.pipeline.log_delete_error'));
}
}

Expand Down
11 changes: 7 additions & 4 deletions web/src/lib/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ export interface ApiError {
message: string;
}

export function encodeQueryString(_params: Record<string, string | number | boolean | undefined> = {}): string {
const params: Record<string, string | number | boolean> = {};
type QueryParams = Record<string, string | number | boolean>;

Object.keys(_params).forEach((key) => {
const val = _params[key];
export function encodeQueryString(_params: unknown = {}): string {
const __params = _params as QueryParams;
const params: QueryParams = {};

Object.keys(__params).forEach((key) => {
const val = __params[key];
if (val !== undefined) {
params[key] = val;
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import '~/compositions/useFavicon';
import '~/style.css';

import { createPinia } from 'pinia';
import type { Component, ComputedOptions, MethodOptions } from 'vue';
import { createApp } from 'vue';

import App from '~/App.vue';
Expand All @@ -12,7 +11,8 @@ import { i18n } from '~/compositions/useI18n';
import { notifications } from '~/compositions/useNotifications';
import router from '~/router';

const app = createApp(App as Component<any, any, any, ComputedOptions, MethodOptions, any, any>);
// eslint-disable-next-line ts/no-unsafe-argument
const app = createApp(App);

app.use(router);
app.use(notifications);
Expand Down
13 changes: 0 additions & 13 deletions web/tsconfig.eslint.json

This file was deleted.

24 changes: 18 additions & 6 deletions web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "esnext",
"module": "esnext",
"types": ["vite-svg-loader", "vite/client"],
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"useDefineForClassFields": true,
"esModuleInterop": true,
"skipLibCheck": true,
"lib": ["esnext", "dom"],
"paths": {
"~/*": ["./src/*"]
}
},

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.json", "windi.config.ts", "vite.config.ts"],
"exclude": ["node_modules", "**/__tests__/**/*", "**/dist/**/*"]
}
5 changes: 3 additions & 2 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import replace from 'replace-in-file';
import IconsResolver from 'unplugin-icons/resolver';
import Icons from 'unplugin-icons/vite';
import Components from 'unplugin-vue-components/vite';
import type { Plugin } from 'vite';
import prismjs from 'vite-plugin-prismjs';
import WindiCSS from 'vite-plugin-windicss';
import svgLoader from 'vite-svg-loader';
import { defineConfig } from 'vitest/config';

function woodpeckerInfoPlugin() {
function woodpeckerInfoPlugin(): Plugin {
return {
name: 'woodpecker-info',
configureServer() {
Expand All @@ -26,7 +27,7 @@ function woodpeckerInfoPlugin() {
};
}

function externalCSSPlugin() {
function externalCSSPlugin(): Plugin {
return {
name: 'external-css',
transformIndexHtml: {
Expand Down
8 changes: 5 additions & 3 deletions web/windi.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// cSpell:ignore Segoe Roboto Neue Noto
// cSpell:ignore Segoe Roboto Neue Noto nocheck
/* eslint-disable ts/no-unsafe-member-access, ts/no-unsafe-assignment, ts/no-unsafe-argument, ts/no-unsafe-return */
// eslint-disable-next-line ts/ban-ts-comment
// @ts-nocheck

import tinycolor from 'tinycolor2';
import colors from 'windicss/colors';
Expand All @@ -25,6 +28,7 @@ const customColors = {
},
};

/* eslint-disable ts/no-unsafe-call */
export default defineConfig({
darkMode: 'class',
theme: {
Expand Down Expand Up @@ -208,9 +212,7 @@ export default defineConfig({
transitionProperty: {
height: 'max-height',
},
// eslint-disable-next-line ts/no-unsafe-return
stroke: (theme) => theme('colors'),
// eslint-disable-next-line ts/no-unsafe-return
fill: (theme) => theme('colors'),
fontFamily: [
'system-ui',
Expand Down