kopia lustrzana https://github.com/wagtail/wagtail
Eslint - disable rule class-methods-use-this (#9482)
rodzic
a3fa3b86be
commit
4e66afad0a
|
@ -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',
|
||||||
],
|
],
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue