Skip to content

Commit e767b33

Browse files
authored
Update JS dependencies and eslint (#22190)
- Update all JS dependencies to latest version - Enable unicorn/prefer-node-protocol and autofix issues - Regenerate SVGs - Add some comments to eslint rules - Tested build, Mermaid and Katex rendering
1 parent 495b8b3 commit e767b33

14 files changed

+1574
-1342
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ steps:
551551

552552
# TODO: We should probably build all dependencies into a test image
553553
- name: test-e2e
554-
image: mcr.microsoft.com/playwright:v1.28.0-focal
554+
image: mcr.microsoft.com/playwright:v1.29.0-focal
555555
commands:
556556
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
557557
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea

.eslintrc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ rules:
255255
no-irregular-whitespace: [2]
256256
no-iterator: [2]
257257
no-label-var: [2]
258-
no-labels: [0]
258+
no-labels: [0] # handled by no-restricted-syntax
259259
no-lone-blocks: [2]
260260
no-lonely-if: [0]
261261
no-loop-func: [0]
@@ -335,7 +335,7 @@ rules:
335335
no-void: [2]
336336
no-warning-comments: [0]
337337
no-whitespace-before-property: [2]
338-
no-with: [0]
338+
no-with: [0] # handled by no-restricted-syntax
339339
nonblock-statement-body-position: [2]
340340
object-curly-newline: [0]
341341
object-curly-spacing: [2, never]
@@ -495,7 +495,7 @@ rules:
495495
unicorn/prefer-native-coercion-functions: [2]
496496
unicorn/prefer-negative-index: [2]
497497
unicorn/prefer-node-append: [0]
498-
unicorn/prefer-node-protocol: [0]
498+
unicorn/prefer-node-protocol: [2]
499499
unicorn/prefer-node-remove: [0]
500500
unicorn/prefer-number-properties: [0]
501501
unicorn/prefer-object-from-entries: [2]

build/generate-images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import imageminZopfli from 'imagemin-zopfli';
33
import {optimize} from 'svgo';
44
import {fabric} from 'fabric';
5-
import {readFile, writeFile} from 'fs/promises';
5+
import {readFile, writeFile} from 'node:fs/promises';
66

77
function exit(err) {
88
if (err) console.error(err);

build/generate-svg.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22
import fastGlob from 'fast-glob';
33
import {optimize} from 'svgo';
4-
import {parse} from 'path';
5-
import {readFile, writeFile, mkdir} from 'fs/promises';
6-
import {fileURLToPath} from 'url';
4+
import {parse} from 'node:path';
5+
import {readFile, writeFile, mkdir} from 'node:fs/promises';
6+
import {fileURLToPath} from 'node:url';
77

88
const glob = (pattern) => fastGlob.sync(pattern, {
99
cwd: fileURLToPath(new URL('..', import.meta.url)),

0 commit comments

Comments
 (0)