0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-20 12:43:28 +01:00

Update JS deps and eslint enhancements (#36147)

- Update all JS deps
- Tested affected `dependencies`
- Replace eslint `unstable_native_nodejs_ts_config` with optional `jiti`
dependency. This will be more compatible with editor integrations that
may not pass this flag.
- Enable additional eslint rules, no new issues
- Move `typescript` to `devDependencies` because `make frontend` works
without it
This commit is contained in:
silverwind 2025-12-17 18:35:33 +01:00 committed by GitHub
parent 852bf5e2a5
commit ad49b7bf31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 839 additions and 552 deletions

View File

@ -339,12 +339,12 @@ lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backen
.PHONY: lint-js .PHONY: lint-js
lint-js: node_modules ## lint js files lint-js: node_modules ## lint js files
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 --flag unstable_native_nodejs_ts_config $(ESLINT_FILES) $(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES)
$(NODE_VARS) pnpm exec vue-tsc $(NODE_VARS) pnpm exec vue-tsc
.PHONY: lint-js-fix .PHONY: lint-js-fix
lint-js-fix: node_modules ## lint js files and fix issues lint-js-fix: node_modules ## lint js files and fix issues
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 --flag unstable_native_nodejs_ts_config $(ESLINT_FILES) --fix $(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES) --fix
$(NODE_VARS) pnpm exec vue-tsc $(NODE_VARS) pnpm exec vue-tsc
.PHONY: lint-css .PHONY: lint-css

View File

@ -215,7 +215,7 @@ export default defineConfig([
'@typescript-eslint/no-unnecessary-condition': [0], '@typescript-eslint/no-unnecessary-condition': [0],
'@typescript-eslint/no-unnecessary-qualifier': [0], '@typescript-eslint/no-unnecessary-qualifier': [0],
'@typescript-eslint/no-unnecessary-template-expression': [0], '@typescript-eslint/no-unnecessary-template-expression': [0],
'@typescript-eslint/no-unnecessary-type-arguments': [0], '@typescript-eslint/no-unnecessary-type-arguments': [2],
'@typescript-eslint/no-unnecessary-type-assertion': [2], '@typescript-eslint/no-unnecessary-type-assertion': [2],
'@typescript-eslint/no-unnecessary-type-constraint': [2], '@typescript-eslint/no-unnecessary-type-constraint': [2],
'@typescript-eslint/no-unnecessary-type-conversion': [2], '@typescript-eslint/no-unnecessary-type-conversion': [2],
@ -228,11 +228,12 @@ export default defineConfig([
'@typescript-eslint/no-unsafe-member-access': [0], '@typescript-eslint/no-unsafe-member-access': [0],
'@typescript-eslint/no-unsafe-return': [0], '@typescript-eslint/no-unsafe-return': [0],
'@typescript-eslint/no-unsafe-unary-minus': [2], '@typescript-eslint/no-unsafe-unary-minus': [2],
'@typescript-eslint/no-unused-expressions': [0], '@typescript-eslint/no-unused-expressions': [2],
'@typescript-eslint/no-unused-private-class-members': [2], '@typescript-eslint/no-unused-private-class-members': [2],
'@typescript-eslint/no-unused-vars': [2, {vars: 'all', args: 'all', caughtErrors: 'all', ignoreRestSiblings: false, argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_'}], '@typescript-eslint/no-unused-vars': [2, {vars: 'all', args: 'all', caughtErrors: 'all', ignoreRestSiblings: false, argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_'}],
'@typescript-eslint/no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true, typedefs: false, enums: false, ignoreTypeReferences: true}], '@typescript-eslint/no-use-before-define': [2, {functions: false, classes: true, variables: true, allowNamedExports: true, typedefs: false, enums: false, ignoreTypeReferences: true}],
'@typescript-eslint/no-useless-constructor': [0], '@typescript-eslint/no-useless-constructor': [0],
'@typescript-eslint/no-useless-default-assignment': [0], // https://github.com/typescript-eslint/typescript-eslint/issues/11847
'@typescript-eslint/no-useless-empty-export': [0], '@typescript-eslint/no-useless-empty-export': [0],
'@typescript-eslint/no-wrapper-object-types': [2], '@typescript-eslint/no-wrapper-object-types': [2],
'@typescript-eslint/non-nullable-type-assertion-style': [0], '@typescript-eslint/non-nullable-type-assertion-style': [0],
@ -584,7 +585,7 @@ export default defineConfig([
'no-unreachable': [2], 'no-unreachable': [2],
'no-unsafe-finally': [2], 'no-unsafe-finally': [2],
'no-unsafe-negation': [2], 'no-unsafe-negation': [2],
'no-unused-expressions': [2], 'no-unused-expressions': [0], // handled by @typescript-eslint/no-unused-expressions
'no-unused-labels': [2], 'no-unused-labels': [2],
'no-unused-private-class-members': [0], // handled by @typescript-eslint/no-unused-private-class-members 'no-unused-private-class-members': [0], // handled by @typescript-eslint/no-unused-private-class-members
'no-unused-vars': [0], // handled by @typescript-eslint/no-unused-vars 'no-unused-vars': [0], // handled by @typescript-eslint/no-unused-vars

View File

@ -1,6 +1,6 @@
{ {
"type": "module", "type": "module",
"packageManager": "pnpm@10.24.0", "packageManager": "pnpm@10.26.0",
"engines": { "engines": {
"node": ">= 22.6.0", "node": ">= 22.6.0",
"pnpm": ">= 10.0.0" "pnpm": ">= 10.0.0"
@ -12,7 +12,7 @@
"@citation-js/plugin-software-formats": "0.6.1", "@citation-js/plugin-software-formats": "0.6.1",
"@github/markdown-toolbar-element": "2.2.3", "@github/markdown-toolbar-element": "2.2.3",
"@github/paste-markdown": "1.5.3", "@github/paste-markdown": "1.5.3",
"@github/relative-time-element": "4.5.1", "@github/relative-time-element": "5.0.0",
"@github/text-expander-element": "2.9.2", "@github/text-expander-element": "2.9.2",
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3", "@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
"@primer/octicons": "19.21.1", "@primer/octicons": "19.21.1",
@ -21,7 +21,7 @@
"@techknowlogick/license-checker-webpack-plugin": "0.3.0", "@techknowlogick/license-checker-webpack-plugin": "0.3.0",
"add-asset-webpack-plugin": "3.1.1", "add-asset-webpack-plugin": "3.1.1",
"ansi_up": "6.0.6", "ansi_up": "6.0.6",
"asciinema-player": "3.12.1", "asciinema-player": "3.13.5",
"chart.js": "4.5.1", "chart.js": "4.5.1",
"chartjs-adapter-dayjs-4": "1.0.4", "chartjs-adapter-dayjs-4": "1.0.4",
"chartjs-plugin-zoom": "2.2.0", "chartjs-plugin-zoom": "2.2.0",
@ -36,32 +36,31 @@
"htmx.org": "2.0.8", "htmx.org": "2.0.8",
"idiomorph": "0.7.4", "idiomorph": "0.7.4",
"jquery": "3.7.1", "jquery": "3.7.1",
"katex": "0.16.25", "katex": "0.16.27",
"mermaid": "11.12.2", "mermaid": "11.12.2",
"mini-css-extract-plugin": "2.9.4", "mini-css-extract-plugin": "2.9.4",
"monaco-editor": "0.55.1", "monaco-editor": "0.55.1",
"monaco-editor-webpack-plugin": "7.1.1", "monaco-editor-webpack-plugin": "7.1.1",
"online-3d-viewer": "0.16.0", "online-3d-viewer": "0.17.0",
"pdfobject": "2.3.1", "pdfobject": "2.3.1",
"perfect-debounce": "2.0.0", "perfect-debounce": "2.0.0",
"postcss": "8.5.6", "postcss": "8.5.6",
"postcss-loader": "8.2.0", "postcss-loader": "8.2.0",
"sortablejs": "1.15.6", "sortablejs": "1.15.6",
"swagger-ui-dist": "5.30.3", "swagger-ui-dist": "5.31.0",
"tailwindcss": "3.4.17", "tailwindcss": "3.4.17",
"throttle-debounce": "5.0.2", "throttle-debounce": "5.0.2",
"tinycolor2": "1.6.0", "tinycolor2": "1.6.0",
"tippy.js": "6.3.7", "tippy.js": "6.3.7",
"toastify-js": "1.12.0", "toastify-js": "1.12.0",
"tributejs": "5.1.3", "tributejs": "5.1.3",
"typescript": "5.9.3",
"uint8-to-base64": "0.2.1", "uint8-to-base64": "0.2.1",
"vanilla-colorful": "0.7.2", "vanilla-colorful": "0.7.2",
"vue": "3.5.25", "vue": "3.5.25",
"vue-bar-graph": "2.2.0", "vue-bar-graph": "2.2.0",
"vue-chartjs": "5.3.3", "vue-chartjs": "5.3.3",
"vue-loader": "17.4.2", "vue-loader": "17.4.2",
"webpack": "5.103.0", "webpack": "5.104.0",
"webpack-cli": "6.0.1", "webpack-cli": "6.0.1",
"wrap-ansi": "9.0.2" "wrap-ansi": "9.0.2"
}, },
@ -80,10 +79,10 @@
"@types/throttle-debounce": "5.0.2", "@types/throttle-debounce": "5.0.2",
"@types/tinycolor2": "1.4.6", "@types/tinycolor2": "1.4.6",
"@types/toastify-js": "1.12.4", "@types/toastify-js": "1.12.4",
"@typescript-eslint/parser": "8.48.1", "@typescript-eslint/parser": "8.50.0",
"@vitejs/plugin-vue": "6.0.2", "@vitejs/plugin-vue": "6.0.3",
"@vitest/eslint-plugin": "1.5.1", "@vitest/eslint-plugin": "1.5.2",
"eslint": "9.39.1", "eslint": "9.39.2",
"eslint-import-resolver-typescript": "4.4.4", "eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-array-func": "5.1.0", "eslint-plugin-array-func": "5.1.0",
"eslint-plugin-github": "6.0.0", "eslint-plugin-github": "6.0.0",
@ -97,7 +96,8 @@
"eslint-plugin-wc": "3.0.2", "eslint-plugin-wc": "3.0.2",
"globals": "16.5.0", "globals": "16.5.0",
"happy-dom": "20.0.11", "happy-dom": "20.0.11",
"markdownlint-cli": "0.46.0", "jiti": "2.6.1",
"markdownlint-cli": "0.47.0",
"material-icon-theme": "5.29.0", "material-icon-theme": "5.29.0",
"nolyfill": "1.0.44", "nolyfill": "1.0.44",
"postcss-html": "1.8.0", "postcss-html": "1.8.0",
@ -108,11 +108,12 @@
"stylelint-declaration-strict-value": "1.10.11", "stylelint-declaration-strict-value": "1.10.11",
"stylelint-value-no-unknown-custom-properties": "6.0.1", "stylelint-value-no-unknown-custom-properties": "6.0.1",
"svgo": "4.0.0", "svgo": "4.0.0",
"typescript-eslint": "8.48.1", "typescript": "5.9.3",
"updates": "17.0.4", "typescript-eslint": "8.50.0",
"updates": "17.0.7",
"vite-string-plugin": "1.4.9", "vite-string-plugin": "1.4.9",
"vitest": "4.0.15", "vitest": "4.0.16",
"vue-tsc": "3.1.5" "vue-tsc": "3.1.8"
}, },
"browserslist": [ "browserslist": [
"defaults" "defaults"

1345
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff