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>
28 lines
867 B
Markdown
28 lines
867 B
Markdown
# Suggest using `toStrictEqual()` (`prefer-strict-equal`)
|
|
|
|
💡 This rule is manually fixable by
|
|
[editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
|
|
|
|
<!-- end auto-generated rule header -->
|
|
|
|
`toStrictEqual` not only checks that two objects contain the same data but also
|
|
that they have the same structure. It is common to expect objects to not only
|
|
have identical values but also to have identical keys. A stricter equality will
|
|
catch cases where two objects do not have identical keys.
|
|
|
|
## Rule details
|
|
|
|
This rule triggers a warning if `toEqual()` is used to assert equality.
|
|
|
|
The following pattern is considered warning:
|
|
|
|
```js
|
|
expect({ a: 'a', b: undefined }).toEqual({ a: 'a' }); // true
|
|
```
|
|
|
|
The following pattern is not warning:
|
|
|
|
```js
|
|
expect({ a: 'a', b: undefined }).toStrictEqual({ a: 'a' }); // false
|
|
```
|