Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
import/no-named-as-default
⚠️ This rule warns in the following configs: ☑️ recommended, 🚸 warnings.
Reports use of an exported name as the locally imported name of a default export.
Rationale: using an exported name as the name of the default export is likely...
- misleading: others familiar with
foo.jsprobably expect the name to befoo - a mistake: only needed to import
barand forgot the brackets (the case that is prompting this)
Rule Details
Given:
// foo.js
export default 'foo';
export const bar = 'baz';
...this would be valid:
import foo from './foo.js';
...and this would be reported:
// message: Using exported name 'bar' as identifier for default export.
import bar from './foo.js';
For post-ES2015 export extensions, this also prevents exporting the default from a referenced module as a name within that module, for the same reasons:
// valid:
export foo from './foo.js';
// message: Using exported name 'bar' as identifier for default export.
export bar from './foo.js';
Further Reading
- ECMAScript Proposal: export ns from
- ECMAScript Proposal: export default from