Upgrade to eslint 9

This commit is contained in:
patwork
2024-05-12 04:16:02 +02:00
parent 8e2141eac5
commit 1a89ae70eb
16 changed files with 917 additions and 1604 deletions

View File

@@ -279,7 +279,7 @@ const GodotDisplayScreen = {
return 0;
},
_updateGL: function () {
const gl_context_handle = _emscripten_webgl_get_current_context(); // eslint-disable-line no-undef
const gl_context_handle = _emscripten_webgl_get_current_context();
const gl = GL.getContext(gl_context_handle);
if (gl) {
GL.resizeOffscreenFramebuffer(gl);
@@ -392,19 +392,19 @@ const GodotDisplay = {
const func = GodotRuntime.get_func(p_callback);
function listener_end(evt) {
evt.currentTarget.cb(1 /*TTS_UTTERANCE_ENDED*/, evt.currentTarget.id, 0);
evt.currentTarget.cb(1 /* TTS_UTTERANCE_ENDED */, evt.currentTarget.id, 0);
}
function listener_start(evt) {
evt.currentTarget.cb(0 /*TTS_UTTERANCE_STARTED*/, evt.currentTarget.id, 0);
evt.currentTarget.cb(0 /* TTS_UTTERANCE_STARTED */, evt.currentTarget.id, 0);
}
function listener_error(evt) {
evt.currentTarget.cb(2 /*TTS_UTTERANCE_CANCELED*/, evt.currentTarget.id, 0);
evt.currentTarget.cb(2 /* TTS_UTTERANCE_CANCELED */, evt.currentTarget.id, 0);
}
function listener_bound(evt) {
evt.currentTarget.cb(3 /*TTS_UTTERANCE_BOUNDARY*/, evt.currentTarget.id, evt.charIndex);
evt.currentTarget.cb(3 /* TTS_UTTERANCE_BOUNDARY */, evt.currentTarget.id, evt.charIndex);
}
const utterance = new SpeechSynthesisUtterance(GodotRuntime.parseString(p_text));

View File

@@ -78,7 +78,7 @@ const GodotConfig = {
},
locate_file: function (file) {
return Module['locateFile'](file); // eslint-disable-line no-undef
return Module['locateFile'](file);
},
clear: function () {
GodotConfig.canvas = null;

View File

@@ -34,7 +34,7 @@ const GodotRuntime = {
* Functions
*/
get_func: function (ptr) {
return wasmTable.get(ptr); // eslint-disable-line no-undef
return wasmTable.get(ptr);
},
/*
@@ -52,19 +52,19 @@ const GodotRuntime = {
* Memory
*/
malloc: function (p_size) {
return _malloc(p_size); // eslint-disable-line no-undef
return _malloc(p_size);
},
free: function (p_ptr) {
_free(p_ptr); // eslint-disable-line no-undef
_free(p_ptr);
},
getHeapValue: function (p_ptr, p_type) {
return getValue(p_ptr, p_type); // eslint-disable-line no-undef
return getValue(p_ptr, p_type);
},
setHeapValue: function (p_ptr, p_value, p_type) {
setValue(p_ptr, p_value, p_type); // eslint-disable-line no-undef
setValue(p_ptr, p_value, p_type);
},
heapSub: function (p_heap, p_ptr, p_len) {
@@ -86,7 +86,7 @@ const GodotRuntime = {
* Strings
*/
parseString: function (p_ptr) {
return UTF8ToString(p_ptr); // eslint-disable-line no-undef
return UTF8ToString(p_ptr);
},
parseStringArray: function (p_ptr, p_size) {
@@ -99,13 +99,13 @@ const GodotRuntime = {
},
strlen: function (p_str) {
return lengthBytesUTF8(p_str); // eslint-disable-line no-undef
return lengthBytesUTF8(p_str);
},
allocString: function (p_str) {
const length = GodotRuntime.strlen(p_str) + 1;
const c_str = GodotRuntime.malloc(length);
stringToUTF8(p_str, c_str, length); // eslint-disable-line no-undef
stringToUTF8(p_str, c_str, length);
return c_str;
},
@@ -126,7 +126,7 @@ const GodotRuntime = {
},
stringToHeap: function (p_str, p_ptr, p_len) {
return stringToUTF8Array(p_str, HEAP8, p_ptr, p_len); // eslint-disable-line no-undef
return stringToUTF8Array(p_str, HEAP8, p_ptr, p_len);
},
},
};

View File

@@ -38,7 +38,7 @@ const GodotWebGL2 = {
godot_webgl2_glGetBufferSubData__sig: 'vippp',
godot_webgl2_glGetBufferSubData__deps: ['$GL', 'emscripten_webgl_get_current_context'],
godot_webgl2_glGetBufferSubData: function (target, offset, size, data) {
const gl_context_handle = _emscripten_webgl_get_current_context(); // eslint-disable-line no-undef
const gl_context_handle = _emscripten_webgl_get_current_context();
const gl = GL.getContext(gl_context_handle);
if (gl) {
gl.GLctx['getBufferSubData'](target, offset, HEAPU8, data, size);