This rule enforces a limit on cypress viewport size. It does not account for identifiers.
Examples of incorrect code for this rule:
/*eslint saxo/cy-viewport-max: ["error", { maxWidth: 1600, maxHeight: 1160 }]*/
cy.viewport(1600, 1260);
/*eslint saxo/cy-viewport-max: ["error", { maxWidth: 1600 }]*/
cy.viewport(1700, 1160);
/*eslint saxo/cy-viewport-max: ["error", { maxHeight: 1160 }]*/
cy.viewport(1600, 1700);
Examples of correct code for this rule:
/*eslint saxo/cy-viewport-max: ["error", { maxWidth: 1600, maxHeight: 1160 }]*/
cy.viewport(1600, 1160);
/*eslint saxo/cy-viewport-max: ["error", { maxWidth: 1600 }]*/
cy.viewport(1600, 1160);
/*eslint saxo/cy-viewport-max: ["error", { maxHeight: 1160 }]*/
cy.viewport(1600, 1160);
This rule has an object option, containing two properties.
'maxWidth' enforces a limit on the height of the viewport. 'maxHeight' enforces a limit on the width of the viewport.