diff --git a/eslint.config.js b/eslint.config.js new file mode 120000 index 00000000..8e6e2c0d --- /dev/null +++ b/eslint.config.js @@ -0,0 +1 @@ +tools/eslint.config.js \ No newline at end of file diff --git a/tools/eslint.config.js b/tools/eslint.config.js new file mode 100644 index 00000000..27df2ce6 --- /dev/null +++ b/tools/eslint.config.js @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: 2025 Florian Müllner +// SPDX-License-Identifier: MIT OR LGPL-2.0-or-later + +import {defineConfig} from '@eslint/config-helpers'; +import gnome from 'eslint-config-gnome'; + +export default defineConfig([ + gnome.configs.recommended, + gnome.configs.jsdoc, + { + rules: { + camelcase: ['error', { + properties: 'never', + }], + 'consistent-return': 'error', + 'eqeqeq': ['error', 'smart'], + 'key-spacing': ['error', { + mode: 'minimum', + beforeColon: false, + afterColon: true, + }], + 'prefer-arrow-callback': 'error', + 'jsdoc/require-param-description': 'off', + 'jsdoc/require-jsdoc': ['error', { + exemptEmptyFunctions: true, + publicOnly: { + esm: true, + }, + }], + }, + languageOptions: { + globals: { + global: 'readonly', + }, + }, + }, +]); diff --git a/tools/package-lock.json b/tools/package-lock.json index 5c364745..25e08d2d 100644 Binary files a/tools/package-lock.json and b/tools/package-lock.json differ diff --git a/tools/package.json b/tools/package.json index 6b7e68b6..440df771 100644 --- a/tools/package.json +++ b/tools/package.json @@ -9,6 +9,6 @@ }, "dependencies": { "ci-run-eslint": "git+https://gitlab.gnome.org/World/javascript/ci-run-eslint.git", - "eslint-plugin-jsdoc": "^48.11.0" + "eslint-config-gnome": "git+https://gitlab.gnome.org/World/javascript/eslint-config-gnome.git" } }