93eac46b1d
Now that all code conforms with the rule, we can enforce it to make sure we stick to it with new code. Relax the rule for destructuring, so we don't have to jump through hoops to avoid "mixed" assignments. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/432>
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
// 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',
|
|
'prefer-const': ['error', {
|
|
destructuring: 'all',
|
|
}],
|
|
'jsdoc/require-param-description': 'off',
|
|
'jsdoc/require-jsdoc': ['error', {
|
|
exemptEmptyFunctions: true,
|
|
publicOnly: {
|
|
esm: true,
|
|
},
|
|
}],
|
|
},
|
|
languageOptions: {
|
|
globals: {
|
|
global: 'readonly',
|
|
},
|
|
},
|
|
},
|
|
]);
|