Skip to content

Commit f7094c8

Browse files
authored
Update JS dependencies, adjust eslint config (go-gitea#17904)
- Update all JS dependencies to latest versions - Add new lint rules, enable es2022 eslint parser features - Disable github/no-then, I feel the rule was too restricting
1 parent c7c723c commit f7094c8

9 files changed

+1495
-1257
lines changed

.eslintrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ignorePatterns:
66

77
parserOptions:
88
sourceType: module
9-
ecmaVersion: 2021
9+
ecmaVersion: latest
1010

1111
plugins:
1212
- eslint-plugin-unicorn
@@ -109,7 +109,7 @@ rules:
109109
github/no-implicit-buggy-globals: [0]
110110
github/no-inner-html: [0]
111111
github/no-innerText: [2]
112-
github/no-then: [2]
112+
github/no-then: [0]
113113
github/no-useless-passive: [2]
114114
github/prefer-observers: [0]
115115
github/require-passive-events: [2]
@@ -384,6 +384,7 @@ rules:
384384
unicorn/no-array-instanceof: [0]
385385
unicorn/no-array-method-this-argument: [2]
386386
unicorn/no-array-push-push: [2]
387+
unicorn/no-await-expression-member: [0]
387388
unicorn/no-console-spaces: [0]
388389
unicorn/no-document-cookie: [2]
389390
unicorn/no-empty-file: [2]
@@ -419,6 +420,7 @@ rules:
419420
unicorn/prefer-array-index-of: [2]
420421
unicorn/prefer-array-some: [2]
421422
unicorn/prefer-at: [0]
423+
unicorn/prefer-code-point: [2]
422424
unicorn/prefer-dataset: [2]
423425
unicorn/prefer-date-now: [2]
424426
unicorn/prefer-default-parameters: [0]

build/generate-images.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ async function main() {
8080
]);
8181
}
8282

83-
main().then(exit).catch(exit); // eslint-disable-line github/no-then
83+
main().then(exit).catch(exit);
8484

build/generate-svg.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ async function main() {
5454
]);
5555
}
5656

57-
main().then(exit).catch(exit); // eslint-disable-line github/no-then
57+
main().then(exit).catch(exit);
5858

0 commit comments

Comments
 (0)