eslint - move 'prefer-destructuring' disabling to core rules

- this rule does not align with preferred code approach
pull/9258/head
LB Johnston 2022-09-20 20:32:33 +10:00 zatwierdzone przez Matt Westcott
rodzic 458b77e5ae
commit eb398a5f9b
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -11,7 +11,6 @@ const legacyCode = {
'no-prototype-builtins': 'off',
'no-restricted-syntax': 'off',
'no-this-before-super': 'off',
'prefer-destructuring': 'off',
};
module.exports = {
@ -59,6 +58,8 @@ module.exports = {
'error',
{ allow: ['__REDUX_DEVTOOLS_EXTENSION__'] },
],
// this rule can be confusing as it forces some non-intuitive code for variable assignment
'prefer-destructuring': 'off',
},
settings: {
'import/core-modules': ['jquery'],

Wyświetl plik

@ -1,7 +1,6 @@
import $ from 'jquery';
import { initCollapsiblePanels } from './panels';
// eslint-disable-next-line prefer-destructuring
const buildExpandingFormset = window.buildExpandingFormset;
/**