From fb0c2a6f62926f3c256a8d3572c4b15f04a682b0 Mon Sep 17 00:00:00 2001 From: Luis Blanco Date: Sun, 2 Jun 2024 11:55:48 +0400 Subject: [PATCH] Fix eslint --- eslint.config.js | 3 ++ examples/lesson02.js | 2 +- examples/lesson05.js | 2 +- examples/lesson08.js | 2 +- examples/package-lock.json | 102 +++++++++++++++++++++++++++++++++++++ examples/screen_aligned.js | 2 +- 6 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 examples/package-lock.json diff --git a/eslint.config.js b/eslint.config.js index 4a500c3..b748da4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,6 +4,9 @@ const js = require('@eslint/js'); module.exports = [ + { + ignores: ['examples/libs'] + }, js.configs.recommended, { languageOptions: { diff --git a/examples/lesson02.js b/examples/lesson02.js index 29bda2c..28fe112 100644 --- a/examples/lesson02.js +++ b/examples/lesson02.js @@ -45,7 +45,7 @@ const shaders = { const initContext = (canvas) => { try { gl = canvas.getContext('webgl'); - } catch (e) { + } catch (_e) { console.error('Could not initialise WebGL, sorry :-('); process.exit(-1); } diff --git a/examples/lesson05.js b/examples/lesson05.js index 22090f0..f0d5f35 100644 --- a/examples/lesson05.js +++ b/examples/lesson05.js @@ -46,7 +46,7 @@ const shaders = { const initContext = (canvas) => { try { gl = canvas.getContext('webgl'); - } catch (e) { + } catch (_e) { console.error('Could not initialise WebGL, sorry :-('); process.exit(-1); } diff --git a/examples/lesson08.js b/examples/lesson08.js index 8e9da77..422d8c5 100644 --- a/examples/lesson08.js +++ b/examples/lesson08.js @@ -63,7 +63,7 @@ const shaders = { const initContext = (canvas) => { try { gl = canvas.getContext('webgl'); - } catch (e) { + } catch (_e) { console.error('Could not initialise WebGL, sorry :-('); process.exit(-1); } diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 0000000..05f3b4d --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,102 @@ +{ + "name": "example", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.0", + "dependencies": { + "glfw-raub": "^5.5.0", + "image-raub": "^4.3.0" + } + }, + "node_modules/addon-tools-raub": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/addon-tools-raub/-/addon-tools-raub-8.0.0.tgz", + "integrity": "sha512-6D5nqyl/wtgPQkRhHMO9mKz+8i7N8ws2MuXxBpClOAsiwvVqIqs/gvUCkS4Ia0ixsCltvWQvZvGMwr3UjtJO3g==", + "engines": { + "node": ">=20.14.0", + "npm": ">=10.7.0" + }, + "peerDependencies": { + "node-addon-api": "^8.0.0" + }, + "peerDependenciesMeta": { + "node-addon-api": { + "optional": true + } + } + }, + "node_modules/deps-freeimage-raub": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/deps-freeimage-raub/-/deps-freeimage-raub-5.0.0.tgz", + "integrity": "sha512-arWoPAcj68IFm+ZdpTDav3Cp6nSMm8JZlObSkrKQn98/ydU02BWlQtKJ6YEM7j1zDaXqHHhVUzlgPXMw8A28Ow==", + "hasInstallScript": true, + "dependencies": { + "addon-tools-raub": "^8.0.0" + }, + "engines": { + "node": ">=20.14.0", + "npm": ">=10.7.0" + } + }, + "node_modules/deps-opengl-raub": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/deps-opengl-raub/-/deps-opengl-raub-6.0.0.tgz", + "integrity": "sha512-Dh7cCwIOkP3urP2qGhDh6sNy9bjLRcq3DdqqiCNChQ6c0d+2Z7nXNH163xGJS6HvKgoZQ3uog8k0V25ANLoYRQ==", + "hasInstallScript": true, + "dependencies": { + "addon-tools-raub": "^8.0.0" + }, + "engines": { + "node": ">=20.14.0", + "npm": ">=10.7.0" + } + }, + "node_modules/glfw-raub": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/glfw-raub/-/glfw-raub-5.5.0.tgz", + "integrity": "sha512-BsiItHUcl97oDiYPRbWo9ApcnTc4K3135wxBD8uK82vsu1axf8bmjgEaAVA66mT0yizHEv113QKZNjAaKnZexQ==", + "hasInstallScript": true, + "dependencies": { + "addon-tools-raub": "^8.0.0", + "deps-opengl-raub": "^6.0.0", + "segfault-raub": "^2.3.0" + }, + "engines": { + "node": ">=20.14.0", + "npm": ">=10.7.0" + } + }, + "node_modules/image-raub": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/image-raub/-/image-raub-4.3.0.tgz", + "integrity": "sha512-EvLfWQXvIwZGeCgulzR+Nl8/5WJ3c0aTjMbYdO1GtbJLPejhcxNpZtnNlIps+MtsG64jBLQaABf5VClzu4pbgA==", + "hasInstallScript": true, + "dependencies": { + "addon-tools-raub": "^8.0.0", + "deps-freeimage-raub": "^5.0.0", + "segfault-raub": "^2.3.0" + }, + "engines": { + "node": ">=20.14.0", + "npm": ">=10.7.0" + } + }, + "node_modules/segfault-raub": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/segfault-raub/-/segfault-raub-2.3.0.tgz", + "integrity": "sha512-haDw5iuPN49R9Ik/vDNygd4/7fTtW22EQl8l8WPLywfKf/1tYJJR5gVNjzNiePL4hVzyiCjZisFcoxveXQNQUQ==", + "hasInstallScript": true, + "dependencies": { + "addon-tools-raub": "^8.0.0" + }, + "engines": { + "node": ">=20.14.0", + "npm": ">=10.7.0" + } + } + } +} diff --git a/examples/screen_aligned.js b/examples/screen_aligned.js index 7203659..b5e956f 100644 --- a/examples/screen_aligned.js +++ b/examples/screen_aligned.js @@ -44,7 +44,7 @@ let shaders = { const initContext = (canvas) => { try { gl = canvas.getContext('webgl'); - } catch (e) { + } catch (_e) { console.error('Could not initialise WebGL, sorry :-('); process.exit(-1); }