kopia lustrzana https://github.com/wagtail/wagtail
Disable ESLint prefer-default-export globally (#8577)
- default / named exports are used in varying places and it is not a critical blocker for future code - disable this rule and in the future it can be re-assessed or moved to the core wagtail eslint configpull/8591/head
rodzic
1a49cae272
commit
9a04aefe9a
|
@ -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'] }],
|
||||
|
|
|
@ -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]'),
|
||||
) => {
|
||||
|
|
|
@ -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,
|
||||
|
|
Ładowanie…
Reference in New Issue