tools: Switch to flat config for eslint
Both the .json and .yml config formats are deprecated in favor of flat configs exported from eslint.config.js files. The good news is that gjs' config is now available as a shared config from the `eslint-config-gnome` package in World/javascript, so we no longer have to copy the entire thing. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/408>
This commit is contained in:
committed by
Marge Bot
parent
f1e0058e67
commit
7d41858bab
Symlink
+1
@@ -0,0 +1 @@
|
||||
tools/eslint.config.js
|
||||
@@ -0,0 +1,37 @@
|
||||
// SPDX-FileCopyrightText: 2025 Florian Müllner <fmuellner@gnome.org>
|
||||
// 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',
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
Generated
BIN
Binary file not shown.
+1
-1
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user