diff --git a/.eslintrc.js b/.eslintrc.js index dff7b3a7fe..a706e1f3af 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,7 +11,6 @@ const legacyCode = { 'import/no-unresolved': ['error', { ignore: ['jquery'] }], 'import/no-useless-path-segments': 'off', 'import/order': 'off', - 'import/prefer-default-export': 'off', 'jsx-a11y/alt-text': 'off', 'jsx-a11y/anchor-is-valid': 'off', 'jsx-a11y/click-events-have-key-events': 'off', @@ -79,6 +78,8 @@ module.exports = { }, }, ], + // does not align with the majority of legacy and newer code, some use named others use default exports + 'import/prefer-default-export': 'off', // note you must disable the base rule as it can report incorrect errors 'no-use-before-define': 'off', 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }], diff --git a/client/src/includes/dialog.js b/client/src/includes/dialog.js index 10dee20bd3..c54ed6056a 100644 --- a/client/src/includes/dialog.js +++ b/client/src/includes/dialog.js @@ -1,6 +1,5 @@ import A11yDialog from 'a11y-dialog'; -// eslint-disable-next-line import/prefer-default-export export const dialog = ( dialogs = document.querySelectorAll('[data-dialog]'), ) => { diff --git a/client/storybook/preview.js b/client/storybook/preview.js index 6361ad43d9..36f6d4b576 100644 --- a/client/storybook/preview.js +++ b/client/storybook/preview.js @@ -3,7 +3,6 @@ import '../tests/stubs'; import '../../wagtail/admin/static_src/wagtailadmin/scss/core.scss'; import './preview.scss'; -// eslint-disable-next-line import/prefer-default-export export const parameters = { controls: { hideNoControlsWarning: true,