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.2 KiB
1.2 KiB
Require using .only and .skip over f and x (no-test-prefixes)
💼 This rule is enabled in the ✅ recommended
config.
🔧 This rule is automatically fixable by the
--fix CLI option.
Jest allows you to choose how you want to define focused and skipped tests, with multiple permutations for each:
- only & skip:
it.only,test.only,describe.only,it.skip,test.skip,describe.skip. - 'f' & 'x':
fit,fdescribe,xit,xtest,xdescribe.
This rule enforces usages from the only & skip list.
Rule details
This rule triggers a warning if you use one of the keywords from the 'f' & 'x' list to focus/skip a test.
/*eslint jest/no-test-prefixes: "error"*/
it.only('foo'); // valid
test.only('foo'); // valid
describe.only('foo'); // valid
it.skip('foo'); // valid
test.skip('foo'); // valid
describe.skip('foo'); // valid
fit('foo'); // invalid
fdescribe('foo'); // invalid
xit('foo'); // invalid
xtest('foo'); // invalid
xdescribe('foo'); // invalid