Resolves all 9 remaining non-console lint warnings and promotes all
three rules to errors in .oxlintrc.json.
- prefer-add-event-listener: converted onchange/onclick/onload
assignments to addEventListener in useDraftNotifications.ts and
admin.data-sync.tsx; stored changeHandler ref for proper cleanup
with removeEventListener
- no-unassigned-import: configured rule with allow list for legitimate
side-effect imports (*.css, @testing-library/jest-dom,
@testing-library/cypress/add-commands)
- require-module-specifiers: removed redundant `export {}` from
cypress/support/e2e.ts (file already has an import)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
548 B
TypeScript
21 lines
548 B
TypeScript
import '@testing-library/cypress/add-commands';
|
|
|
|
// Custom commands
|
|
Cypress.Commands.add('login', (email: string, password: string) => {
|
|
cy.session([email, password], () => {
|
|
cy.visit('/sign-in');
|
|
cy.get('input[name="email"]').type(email);
|
|
cy.get('input[name="password"]').type(password);
|
|
cy.get('button[type="submit"]').click();
|
|
cy.url().should('not.include', '/sign-in');
|
|
});
|
|
});
|
|
|
|
declare global {
|
|
namespace Cypress {
|
|
interface Chainable {
|
|
login(email: string, password: string): Chainable<void>;
|
|
}
|
|
}
|
|
}
|
|
|