diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..b18df802 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: No rights reserved +# SPDX-License-Identifier: CC0-1.0 + +package-lock.json -diff diff --git a/.gitignore b/.gitignore index 607ad6ff..be94ff04 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ zip-files/ *.patch *.sw? .buildconfig +.eslintcache .vscode +node_modules diff --git a/REUSE.toml b/REUSE.toml index 9a5ff985..6385d86b 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -29,3 +29,13 @@ SPDX-License-Identifier = "GPL-2.0-or-later" path = ["po/LINGUAS", "po/POTFILES.in"] SPDX-FileCopyrightText = "No rights reserved" SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "tools/package.json" +SPDX-FileCopyrightText = "2025 Florian Müllner " +SPDX-License-Identifier = "MIT OR LGPL-2.0-or-later" + +[[annotations]] +path = "**package-lock.json" +SPDX-FileCopyrightText = "No rights reserved" +SPDX-License-Identifier = "CC0-1.0" diff --git a/tools/package-lock.json b/tools/package-lock.json new file mode 100644 index 00000000..5c364745 Binary files /dev/null and b/tools/package-lock.json differ diff --git a/tools/package.json b/tools/package.json new file mode 100644 index 00000000..6b7e68b6 --- /dev/null +++ b/tools/package.json @@ -0,0 +1,14 @@ +{ + "name": "gnome-shell-extensions-dev-scripts", + "version": "1.0.0", + "license": "MIT OR LGPL-2.0-or-later", + "type": "module", + "private": true, + "scripts": { + "lint": "cd .. && ci-run-eslint" + }, + "dependencies": { + "ci-run-eslint": "git+https://gitlab.gnome.org/World/javascript/ci-run-eslint.git", + "eslint-plugin-jsdoc": "^48.11.0" + } +} diff --git a/tools/run-eslint.sh b/tools/run-eslint.sh new file mode 100755 index 00000000..45bd267d --- /dev/null +++ b/tools/run-eslint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later +# SPDX-FileCopyrightText: 2020 Philip Chimento +# SPDX-FileCopyrightText: 2025 Florian Müllner + +cd $(dirname -- "$0") +[ ! -d node_modules ] && npm clean-install +npm run lint -- "$@"