Eslint - disable rule class-methods-use-this (#9482)

pull/9773/head
LB (Ben Johnston) 2022-12-09 17:33:28 +10:00 zatwierdzone przez GitHub
rodzic a3fa3b86be
commit 4e66afad0a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -1,7 +1,6 @@
// Rules which have been enforced in configuration upgrades and flag issues in existing code. // Rules which have been enforced in configuration upgrades and flag issues in existing code.
// We need to consider whether to disable those rules permanently, or fix the issues. // We need to consider whether to disable those rules permanently, or fix the issues.
const legacyCode = { const legacyCode = {
'class-methods-use-this': 'off',
'constructor-super': 'off', 'constructor-super': 'off',
'default-param-last': 'off', 'default-param-last': 'off',
'no-continue': 'off', 'no-continue': 'off',
@ -27,6 +26,8 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': ['error'], '@typescript-eslint/no-use-before-define': ['error'],
// it is often helpful to pull out logic to class methods that may not use `this`
'class-methods-use-this': 'off',
'import/extensions': [ 'import/extensions': [
'error', 'error',
'always', 'always',
@ -72,7 +73,6 @@ module.exports = {
'client/src/entrypoints/admin/page-editor.js', 'client/src/entrypoints/admin/page-editor.js',
'client/src/entrypoints/admin/telepath/widgets.js', 'client/src/entrypoints/admin/telepath/widgets.js',
'client/src/entrypoints/contrib/typed_table_block/typed_table_block.js', 'client/src/entrypoints/contrib/typed_table_block/typed_table_block.js',
'client/src/entrypoints/images/image-chooser-modal.js',
'client/src/utils/actions.ts', 'client/src/utils/actions.ts',
'client/src/utils/version.js', 'client/src/utils/version.js',
], ],

Wyświetl plik

@ -230,7 +230,6 @@ class ChooserModalOnloadHandlerFactory {
initTooltips(); initTooltips();
} }
// eslint-disable-next-line class-methods-use-this
modalHasTabs(modal) { modalHasTabs(modal) {
return $('[data-tabs]', modal.body).length; return $('[data-tabs]', modal.body).length;
} }