Skip to content

Commit 7044d34

Browse files
Update JS dependencies and eslint config (#21388)
- Update all JS dependencies and playwright image - Add new eslint rules, enable a few more, fix issues - Regenerate SVGs - Tested Vue and Swagger Co-authored-by: wxiaoguang <[email protected]>
1 parent a813c9d commit 7044d34

File tree

10 files changed

+1438
-1504
lines changed

10 files changed

+1438
-1504
lines changed

.drone.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ steps:
571571

572572
# TODO: We should probably build all dependencies into a test image
573573
- name: test-e2e
574-
image: mcr.microsoft.com/playwright:v1.26.1-focal
574+
image: mcr.microsoft.com/playwright:v1.27.0-focal
575575
commands:
576576
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
577577
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea

.eslintrc.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ rules:
185185
linebreak-style: [2, unix]
186186
lines-around-comment: [0]
187187
lines-between-class-members: [0]
188+
logical-assignment-operators: [0]
188189
max-classes-per-file: [0]
189190
max-depth: [0]
190191
max-len: [0]
@@ -245,7 +246,7 @@ rules:
245246
no-floating-decimal: [0]
246247
no-func-assign: [2]
247248
no-global-assign: [2]
248-
no-implicit-coercion: [0]
249+
no-implicit-coercion: [2]
249250
no-implicit-globals: [0]
250251
no-implied-eval: [2]
251252
no-import-assign: [2]
@@ -322,7 +323,7 @@ rules:
322323
no-unused-private-class-members: [2]
323324
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
324325
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
325-
no-useless-backreference: [0]
326+
no-useless-backreference: [2]
326327
no-useless-call: [2]
327328
no-useless-catch: [2]
328329
no-useless-computed-key: [2]
@@ -353,7 +354,7 @@ rules:
353354
prefer-named-capture-group: [0]
354355
prefer-numeric-literals: [2]
355356
prefer-object-has-own: [0]
356-
prefer-object-spread: [0]
357+
prefer-object-spread: [2]
357358
prefer-promise-reject-errors: [2, {allowEmptyReject: false}]
358359
prefer-regex-literals: [2]
359360
prefer-rest-params: [2]
@@ -455,6 +456,7 @@ rules:
455456
unicorn/no-static-only-class: [2]
456457
unicorn/no-thenable: [2]
457458
unicorn/no-this-assignment: [2]
459+
unicorn/no-unnecessary-await: [2]
458460
unicorn/no-unreadable-array-destructuring: [0]
459461
unicorn/no-unreadable-iife: [2]
460462
unicorn/no-unsafe-regex: [0]
@@ -519,6 +521,7 @@ rules:
519521
unicorn/require-number-to-fixed-digits-argument: [2]
520522
unicorn/require-post-message-target-origin: [0]
521523
unicorn/string-content: [0]
524+
unicorn/switch-case-braces: [0]
522525
unicorn/template-indent: [2]
523526
unicorn/text-encoding-identifier-case: [0]
524527
unicorn/throw-new-error: [2]

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ lint: lint-frontend lint-backend
341341

342342
.PHONY: lint-frontend
343343
lint-frontend: node_modules
344-
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e/*.test.e2e.js tests/e2e/utils_e2e.js
344+
npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e
345345
npx stylelint --color --max-warnings=0 web_src/less
346346
npx spectral lint -q -F hint $(SWAGGER_SPEC)
347347
npx markdownlint docs *.md

0 commit comments

Comments
 (0)