mirror of
https://github.com/go-gitea/gitea
synced 2026-02-03 06:30:35 +00:00
Update JS deps, remove knip, misc tweaks (#36499)
- Update all JS deps - Enable a few more stylelint stylistic rules and fix issues - Remove knip, it raised another false-positive, this tool is not worth it when you have to babysit it like that - Exclude @eslint/json from updating as it requires unreleased eslint 10 ([ref](https://github.com/eslint/json/issues/207)) - Update labeler config for new eslint filenames - Adjust `make help` output - Add type checking in `stylelint.config.ts`
This commit is contained in:
+1
-1
@@ -84,9 +84,9 @@ docs-update-needed:
|
|||||||
topic/code-linting:
|
topic/code-linting:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file:
|
- any-glob-to-any-file:
|
||||||
- ".eslintrc.cjs"
|
|
||||||
- ".golangci.yml"
|
- ".golangci.yml"
|
||||||
- ".markdownlint.yaml"
|
- ".markdownlint.yaml"
|
||||||
- ".spectral.yaml"
|
- ".spectral.yaml"
|
||||||
- ".yamllint.yaml"
|
- ".yamllint.yaml"
|
||||||
|
- "eslint*.config.*"
|
||||||
- "stylelint.config.*"
|
- "stylelint.config.*"
|
||||||
|
|||||||
@@ -314,16 +314,14 @@ lint-backend: lint-go lint-go-gitea-vet lint-editorconfig ## lint backend files
|
|||||||
lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
|
lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
|
||||||
|
|
||||||
.PHONY: lint-js
|
.PHONY: lint-js
|
||||||
lint-js: node_modules ## lint js files
|
lint-js: node_modules ## lint js and ts files
|
||||||
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(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
|
||||||
$(NODE_VARS) pnpm exec knip --no-progress --cache
|
|
||||||
|
|
||||||
.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 and ts files and fix issues
|
||||||
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(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
|
||||||
$(NODE_VARS) pnpm exec knip --no-progress --cache --fix
|
|
||||||
|
|
||||||
.PHONY: lint-css
|
.PHONY: lint-css
|
||||||
lint-css: node_modules ## lint css files
|
lint-css: node_modules ## lint css files
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
import type {KnipConfig} from 'knip';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
entry: [
|
|
||||||
'*.ts',
|
|
||||||
'tools/**/*.ts',
|
|
||||||
'tests/e2e/**/*.ts',
|
|
||||||
],
|
|
||||||
ignoreDependencies: [
|
|
||||||
// dependencies used in Makefile or tools
|
|
||||||
'@primer/octicons',
|
|
||||||
'markdownlint-cli',
|
|
||||||
'nolyfill',
|
|
||||||
'spectral-cli-bundle',
|
|
||||||
'vue-tsc',
|
|
||||||
'webpack-cli',
|
|
||||||
],
|
|
||||||
} satisfies KnipConfig;
|
|
||||||
+15
-16
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@10.28.1",
|
"packageManager": "pnpm@10.28.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 22.6.0",
|
"node": ">= 22.6.0",
|
||||||
"pnpm": ">= 10.0.0"
|
"pnpm": ">= 10.0.0"
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"clippie": "4.1.9",
|
"clippie": "4.1.9",
|
||||||
"compare-versions": "6.1.1",
|
"compare-versions": "6.1.1",
|
||||||
"cropperjs": "1.6.2",
|
"cropperjs": "1.6.2",
|
||||||
"css-loader": "7.1.2",
|
"css-loader": "7.1.3",
|
||||||
"dayjs": "1.11.19",
|
"dayjs": "1.11.19",
|
||||||
"dropzone": "6.0.0-beta.2",
|
"dropzone": "6.0.0-beta.2",
|
||||||
"easymde": "2.20.0",
|
"easymde": "2.20.0",
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"idiomorph": "0.7.4",
|
"idiomorph": "0.7.4",
|
||||||
"jquery": "4.0.0",
|
"jquery": "4.0.0",
|
||||||
"js-yaml": "4.1.1",
|
"js-yaml": "4.1.1",
|
||||||
"katex": "0.16.27",
|
"katex": "0.16.28",
|
||||||
"mermaid": "11.12.2",
|
"mermaid": "11.12.2",
|
||||||
"mini-css-extract-plugin": "2.10.0",
|
"mini-css-extract-plugin": "2.10.0",
|
||||||
"monaco-editor": "0.55.1",
|
"monaco-editor": "0.55.1",
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint-community/eslint-plugin-eslint-comments": "4.6.0",
|
"@eslint-community/eslint-plugin-eslint-comments": "4.6.0",
|
||||||
"@eslint/json": "0.14.0",
|
"@eslint/json": "0.14.0",
|
||||||
"@playwright/test": "1.58.0",
|
"@playwright/test": "1.58.1",
|
||||||
"@stylistic/eslint-plugin": "5.7.1",
|
"@stylistic/eslint-plugin": "5.7.1",
|
||||||
"@stylistic/stylelint-plugin": "5.0.1",
|
"@stylistic/stylelint-plugin": "5.0.1",
|
||||||
"@types/codemirror": "5.60.17",
|
"@types/codemirror": "5.60.17",
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"@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.53.1",
|
"@typescript-eslint/parser": "8.54.0",
|
||||||
"@vitejs/plugin-vue": "6.0.3",
|
"@vitejs/plugin-vue": "6.0.3",
|
||||||
"@vitest/eslint-plugin": "1.6.6",
|
"@vitest/eslint-plugin": "1.6.6",
|
||||||
"eslint": "9.39.2",
|
"eslint": "9.39.2",
|
||||||
@@ -90,34 +90,33 @@
|
|||||||
"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",
|
||||||
"eslint-plugin-import-x": "4.16.1",
|
"eslint-plugin-import-x": "4.16.1",
|
||||||
"eslint-plugin-playwright": "2.5.0",
|
"eslint-plugin-playwright": "2.5.1",
|
||||||
"eslint-plugin-regexp": "3.0.0",
|
"eslint-plugin-regexp": "3.0.0",
|
||||||
"eslint-plugin-sonarjs": "3.0.5",
|
"eslint-plugin-sonarjs": "3.0.6",
|
||||||
"eslint-plugin-unicorn": "62.0.0",
|
"eslint-plugin-unicorn": "62.0.0",
|
||||||
"eslint-plugin-vue": "10.7.0",
|
"eslint-plugin-vue": "10.7.0",
|
||||||
"eslint-plugin-vue-scoped-css": "2.12.0",
|
"eslint-plugin-vue-scoped-css": "2.12.0",
|
||||||
"eslint-plugin-wc": "3.0.2",
|
"eslint-plugin-wc": "3.0.2",
|
||||||
"globals": "17.1.0",
|
"globals": "17.2.0",
|
||||||
"happy-dom": "20.3.7",
|
"happy-dom": "20.4.0",
|
||||||
"jiti": "2.6.1",
|
"jiti": "2.6.1",
|
||||||
"knip": "5.82.1",
|
|
||||||
"markdownlint-cli": "0.47.0",
|
"markdownlint-cli": "0.47.0",
|
||||||
"material-icon-theme": "5.31.0",
|
"material-icon-theme": "5.31.0",
|
||||||
"nolyfill": "1.0.44",
|
"nolyfill": "1.0.44",
|
||||||
"postcss-html": "1.8.1",
|
"postcss-html": "1.8.1",
|
||||||
"spectral-cli-bundle": "1.0.3",
|
"spectral-cli-bundle": "1.0.3",
|
||||||
"stylelint": "17.0.0",
|
"stylelint": "17.1.0",
|
||||||
"stylelint-config-recommended": "18.0.0",
|
"stylelint-config-recommended": "18.0.0",
|
||||||
"stylelint-declaration-block-no-ignored-properties": "2.8.0",
|
"stylelint-declaration-block-no-ignored-properties": "3.0.0",
|
||||||
"stylelint-declaration-strict-value": "1.10.11",
|
"stylelint-declaration-strict-value": "1.10.11",
|
||||||
"stylelint-value-no-unknown-custom-properties": "6.1.1",
|
"stylelint-value-no-unknown-custom-properties": "6.1.1",
|
||||||
"svgo": "4.0.0",
|
"svgo": "4.0.0",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
"typescript-eslint": "8.53.1",
|
"typescript-eslint": "8.54.0",
|
||||||
"updates": "17.0.8",
|
"updates": "17.0.9",
|
||||||
"vite-string-plugin": "1.5.0",
|
"vite-string-plugin": "2.0.0",
|
||||||
"vitest": "4.0.18",
|
"vitest": "4.0.18",
|
||||||
"vue-tsc": "3.2.3"
|
"vue-tsc": "3.2.4"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"defaults"
|
"defaults"
|
||||||
|
|||||||
Generated
+346
-624
File diff suppressed because it is too large
Load Diff
+5
-3
@@ -1,3 +1,4 @@
|
|||||||
|
// @ts-check
|
||||||
// TODO: Move to .ts after https://github.com/stylelint/stylelint/issues/8893 is fixed
|
// TODO: Move to .ts after https://github.com/stylelint/stylelint/issues/8893 is fixed
|
||||||
import {fileURLToPath} from 'node:url';
|
import {fileURLToPath} from 'node:url';
|
||||||
|
|
||||||
@@ -7,6 +8,7 @@ const cssVarFiles = [
|
|||||||
fileURLToPath(new URL('web_src/css/themes/theme-gitea-dark.css', import.meta.url)),
|
fileURLToPath(new URL('web_src/css/themes/theme-gitea-dark.css', import.meta.url)),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/** @type {import('stylelint').Config} */
|
||||||
export default {
|
export default {
|
||||||
extends: 'stylelint-config-recommended',
|
extends: 'stylelint-config-recommended',
|
||||||
reportUnscopedDisables: true,
|
reportUnscopedDisables: true,
|
||||||
@@ -57,14 +59,14 @@ export default {
|
|||||||
'@stylistic/block-opening-brace-space-before': 'always',
|
'@stylistic/block-opening-brace-space-before': 'always',
|
||||||
'@stylistic/color-hex-case': 'lower',
|
'@stylistic/color-hex-case': 'lower',
|
||||||
'@stylistic/declaration-bang-space-after': 'never',
|
'@stylistic/declaration-bang-space-after': 'never',
|
||||||
'@stylistic/declaration-bang-space-before': null,
|
'@stylistic/declaration-bang-space-before': 'always',
|
||||||
'@stylistic/declaration-block-semicolon-newline-after': null,
|
'@stylistic/declaration-block-semicolon-newline-after': null,
|
||||||
'@stylistic/declaration-block-semicolon-newline-before': null,
|
'@stylistic/declaration-block-semicolon-newline-before': null,
|
||||||
'@stylistic/declaration-block-semicolon-space-after': null,
|
'@stylistic/declaration-block-semicolon-space-after': null,
|
||||||
'@stylistic/declaration-block-semicolon-space-before': 'never',
|
'@stylistic/declaration-block-semicolon-space-before': 'never',
|
||||||
'@stylistic/declaration-block-trailing-semicolon': null,
|
'@stylistic/declaration-block-trailing-semicolon': null,
|
||||||
'@stylistic/declaration-colon-newline-after': null,
|
'@stylistic/declaration-colon-newline-after': null,
|
||||||
'@stylistic/declaration-colon-space-after': null,
|
'@stylistic/declaration-colon-space-after': 'always',
|
||||||
'@stylistic/declaration-colon-space-before': 'never',
|
'@stylistic/declaration-colon-space-before': 'never',
|
||||||
'@stylistic/function-comma-newline-after': null,
|
'@stylistic/function-comma-newline-after': null,
|
||||||
'@stylistic/function-comma-newline-before': null,
|
'@stylistic/function-comma-newline-before': null,
|
||||||
@@ -101,7 +103,7 @@ export default {
|
|||||||
'@stylistic/selector-attribute-operator-space-before': null,
|
'@stylistic/selector-attribute-operator-space-before': null,
|
||||||
'@stylistic/selector-combinator-space-after': null,
|
'@stylistic/selector-combinator-space-after': null,
|
||||||
'@stylistic/selector-combinator-space-before': null,
|
'@stylistic/selector-combinator-space-before': null,
|
||||||
'@stylistic/selector-descendant-combinator-no-non-space': null,
|
'@stylistic/selector-descendant-combinator-no-non-space': true,
|
||||||
'@stylistic/selector-list-comma-newline-after': null,
|
'@stylistic/selector-list-comma-newline-after': null,
|
||||||
'@stylistic/selector-list-comma-newline-before': null,
|
'@stylistic/selector-list-comma-newline-before': null,
|
||||||
'@stylistic/selector-list-comma-space-after': 'always-single-line',
|
'@stylistic/selector-list-comma-space-after': 'always-single-line',
|
||||||
|
|||||||
@@ -5,5 +5,6 @@ export default {
|
|||||||
'@mcaptcha/vanilla-glue', // breaking changes in rc versions need to be handled
|
'@mcaptcha/vanilla-glue', // breaking changes in rc versions need to be handled
|
||||||
'cropperjs', // need to migrate to v2 but v2 is not compatible with v1
|
'cropperjs', // need to migrate to v2 but v2 is not compatible with v1
|
||||||
'tailwindcss', // need to migrate
|
'tailwindcss', // need to migrate
|
||||||
|
'@eslint/json', // needs eslint 10
|
||||||
],
|
],
|
||||||
} satisfies Config;
|
} satisfies Config;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.repository.wiki .wiki-content-toc ul ul {
|
.repository.wiki .wiki-content-toc ul ul {
|
||||||
border-left: 1px var(--color-secondary);
|
border-left: 1px var(--color-secondary);
|
||||||
border-left-style: dashed;
|
border-left-style: dashed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user