aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-02-16 22:41:23 +0100
committerGitHub <noreply@github.com>2024-02-16 21:41:23 +0000
commit26b17537e651fe93ef9b64f961633cb4c0b8c2c3 (patch)
tree6c79c4b8f5ab79c6b6315b9da9ec3f6d64b48423 /build
parentd8d4b33b31d959e4b600cc90a7fa1779b69cadf5 (diff)
downloadgitea-26b17537e651fe93ef9b64f961633cb4c0b8c2c3.tar.gz
gitea-26b17537e651fe93ef9b64f961633cb4c0b8c2c3.zip
Add `eslint-plugin-github` and fix issues (#29201)
This plugin has a few useful rules. The only thing I dislike about it is that it pulls in a rather big number of dependencies for react-related rules we don't use, but it can't really be avoided. Rule docs: https://github.com/github/eslint-plugin-github?tab=readme-ov-file#rules
Diffstat (limited to 'build')
-rwxr-xr-xbuild/generate-images.js6
-rwxr-xr-xbuild/generate-svg.js6
2 files changed, 10 insertions, 2 deletions
diff --git a/build/generate-images.js b/build/generate-images.js
index a3a0f8d8f3..09e3e068af 100755
--- a/build/generate-images.js
+++ b/build/generate-images.js
@@ -79,4 +79,8 @@ async function main() {
]);
}
-main().then(exit).catch(exit);
+try {
+ exit(await main());
+} catch (err) {
+ exit(err);
+}
diff --git a/build/generate-svg.js b/build/generate-svg.js
index b845da9367..2c0a5e37ba 100755
--- a/build/generate-svg.js
+++ b/build/generate-svg.js
@@ -63,4 +63,8 @@ async function main() {
]);
}
-main().then(exit).catch(exit);
+try {
+ exit(await main());
+} catch (err) {
+ exit(err);
+}