From fa81e125889383f4ffd1404dd71def1ae60964c0 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Fri, 23 Feb 2024 16:22:37 -0600 Subject: [PATCH] Fix lint errors in WebXR module --- .github/workflows/static_checks.yml | 2 +- modules/webxr/native/library_godot_webxr.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index e7ebd2fb64e3..cf8b0f413202 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -76,7 +76,7 @@ jobs: - name: JavaScript style and documentation checks via ESLint and JSDoc run: | - if grep -q "platform/web" changed.txt || [ -z "$(cat changed.txt)" ]; then + if grep -q "\.js" changed.txt || [ -z "$(cat changed.txt)" ]; then cd platform/web npm ci npm run lint diff --git a/modules/webxr/native/library_godot_webxr.js b/modules/webxr/native/library_godot_webxr.js index c048bb219727..722b448fd5bf 100644 --- a/modules/webxr/native/library_godot_webxr.js +++ b/modules/webxr/native/library_godot_webxr.js @@ -319,7 +319,7 @@ const GodotWebXR = { // next reference space. window.setTimeout(function () { const reference_space_c_str = GodotRuntime.allocString(reference_space_type); - const enabled_features_c_str = GodotRuntime.allocString(Array.from(session.enabledFeatures).join(",")); + const enabled_features_c_str = GodotRuntime.allocString(Array.from(session.enabledFeatures).join(',')); onstarted(reference_space_c_str, enabled_features_c_str); GodotRuntime.free(reference_space_c_str); GodotRuntime.free(enabled_features_c_str); @@ -567,7 +567,7 @@ const GodotWebXR = { // Hand tracking data. let has_hand_data = false; - if (input_source.hand && r_hand_joints != 0 && r_hand_radii != 0) { + if (input_source.hand && r_hand_joints !== 0 && r_hand_radii !== 0) { const hand_joint_array = new Float32Array(25 * 16); const hand_radii_array = new Float32Array(25); if (frame.fillPoses(input_source.hand.values(), space, hand_joint_array) && frame.fillJointRadii(input_source.hand.values(), hand_radii_array)) {