loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'Update dependency eslint-plugin-unicorn to v56 (forgejo)' (#5663) from renovate/forgejo-eslint-plugin-unicorn-56.x into forgejo

+18 -15
+3
.eslintrc.yaml
··· 656 656 unicorn/catch-error-name: [0] 657 657 unicorn/consistent-destructuring: [2] 658 658 unicorn/consistent-empty-array-spread: [2] 659 + unicorn/consistent-existence-index-check: [2] 659 660 unicorn/consistent-function-scoping: [2] 660 661 unicorn/custom-error-definition: [0] 661 662 unicorn/empty-brace-spaces: [2] ··· 732 733 unicorn/prefer-dom-node-text-content: [2] 733 734 unicorn/prefer-event-target: [2] 734 735 unicorn/prefer-export-from: [0] 736 + unicorn/prefer-global-this: [0] 735 737 unicorn/prefer-includes: [2] 736 738 unicorn/prefer-json-parse-buffer: [0] 737 739 unicorn/prefer-keyboard-event-key: [2] 738 740 unicorn/prefer-logical-operator-over-ternary: [2] 741 + unicorn/prefer-math-min-max: [2] 739 742 unicorn/prefer-math-trunc: [2] 740 743 unicorn/prefer-modern-dom-apis: [0] 741 744 unicorn/prefer-modern-math-apis: [2]
+9 -9
package-lock.json
··· 79 79 "eslint-plugin-playwright": "1.6.2", 80 80 "eslint-plugin-regexp": "2.6.0", 81 81 "eslint-plugin-sonarjs": "2.0.3", 82 - "eslint-plugin-unicorn": "55.0.0", 82 + "eslint-plugin-unicorn": "56.0.0", 83 83 "eslint-plugin-vitest-globals": "1.5.0", 84 84 "eslint-plugin-vue": "9.28.0", 85 85 "eslint-plugin-vue-scoped-css": "2.8.1", ··· 9174 9174 } 9175 9175 }, 9176 9176 "node_modules/eslint-plugin-unicorn": { 9177 - "version": "55.0.0", 9178 - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-55.0.0.tgz", 9179 - "integrity": "sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==", 9177 + "version": "56.0.0", 9178 + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-56.0.0.tgz", 9179 + "integrity": "sha512-aXpddVz/PQMmd69uxO98PA4iidiVNvA0xOtbpUoz1WhBd4RxOQQYqN618v68drY0hmy5uU2jy1bheKEVWBjlPw==", 9180 9180 "dev": true, 9181 9181 "license": "MIT", 9182 9182 "dependencies": { 9183 - "@babel/helper-validator-identifier": "^7.24.5", 9183 + "@babel/helper-validator-identifier": "^7.24.7", 9184 9184 "@eslint-community/eslint-utils": "^4.4.0", 9185 9185 "ci-info": "^4.0.0", 9186 9186 "clean-regexp": "^1.0.0", 9187 - "core-js-compat": "^3.37.0", 9188 - "esquery": "^1.5.0", 9189 - "globals": "^15.7.0", 9187 + "core-js-compat": "^3.38.1", 9188 + "esquery": "^1.6.0", 9189 + "globals": "^15.9.0", 9190 9190 "indent-string": "^4.0.0", 9191 9191 "is-builtin-module": "^3.2.1", 9192 9192 "jsesc": "^3.0.2", ··· 9194 9194 "read-pkg-up": "^7.0.1", 9195 9195 "regexp-tree": "^0.1.27", 9196 9196 "regjsparser": "^0.10.0", 9197 - "semver": "^7.6.1", 9197 + "semver": "^7.6.3", 9198 9198 "strip-indent": "^3.0.0" 9199 9199 }, 9200 9200 "engines": {
+1 -1
package.json
··· 78 78 "eslint-plugin-playwright": "1.6.2", 79 79 "eslint-plugin-regexp": "2.6.0", 80 80 "eslint-plugin-sonarjs": "2.0.3", 81 - "eslint-plugin-unicorn": "55.0.0", 81 + "eslint-plugin-unicorn": "56.0.0", 82 82 "eslint-plugin-vitest-globals": "1.5.0", 83 83 "eslint-plugin-vue": "9.28.0", 84 84 "eslint-plugin-vue-scoped-css": "2.8.1",
+1 -1
web_src/js/features/comp/ComboMarkdownEditor.js
··· 363 363 const lineStart = Math.max(0, value.lastIndexOf('\n', start - 1) + 1); 364 364 // Find the end and extract the line. 365 365 const lineEnd = value.indexOf('\n', start); 366 - const line = value.slice(lineStart, lineEnd < 0 ? value.length : lineEnd); 366 + const line = value.slice(lineStart, lineEnd === -1 ? value.length : lineEnd); 367 367 // Match any whitespace at the start + any repeatable prefix + exactly one space after. 368 368 const prefix = line.match(/^\s*((\d+)[.)]\s|[-*+]\s+(\[[ x]\]\s?)?|(>\s+)+)?/); 369 369
+1 -1
web_src/js/features/eventsource.sharedworker.js
··· 28 28 29 29 deregister(port) { 30 30 const portIdx = this.clients.indexOf(port); 31 - if (portIdx < 0) { 31 + if (portIdx === -1) { 32 32 return this.clients.length; 33 33 } 34 34 this.clients.splice(portIdx, 1);
+2 -2
web_src/js/utils.js
··· 3 3 // transform /path/to/file.ext to file.ext 4 4 export function basename(path = '') { 5 5 const lastSlashIndex = path.lastIndexOf('/'); 6 - return lastSlashIndex < 0 ? path : path.substring(lastSlashIndex + 1); 6 + return lastSlashIndex === -1 ? path : path.substring(lastSlashIndex + 1); 7 7 } 8 8 9 9 // transform /path/to/file.ext to .ext 10 10 export function extname(path = '') { 11 11 const lastPointIndex = path.lastIndexOf('.'); 12 - return lastPointIndex < 0 ? '' : path.substring(lastPointIndex); 12 + return lastPointIndex === -1 ? '' : path.substring(lastPointIndex); 13 13 } 14 14 15 15 // test whether a variable is an object
+1 -1
web_src/js/utils/dom.js
··· 155 155 const isBorderBox = computedStyle.boxSizing === 'border-box'; 156 156 const borderAddOn = isBorderBox ? topBorderWidth + bottomBorderWidth : 0; 157 157 158 - const adjustedViewportMarginBottom = bottom < viewportMarginBottom ? bottom : viewportMarginBottom; 158 + const adjustedViewportMarginBottom = Math.min(bottom, viewportMarginBottom); 159 159 const curHeight = parseFloat(computedStyle.height); 160 160 const maxHeight = curHeight + bottom - adjustedViewportMarginBottom; 161 161