Skip to content

Code Quality

yhAutomationQA edited this page May 16, 2026 · 1 revision

Code Quality

ESLint

Configuration in .eslintrc.json. Key rules:

Rule Level Description
curly error Braces required after all if/else
cypress/unsafe-to-chain-command error No chaining .clear().type()
cypress/no-async-tests error No async test functions
no-console warn Allowed for cy.log() in hooks
prefer-const error Use const unless reassigning
eqeqeq error Always use ===
npm run lint       # Check
npm run lint:fix   # Auto-fix

Prettier

Configuration in .prettierrc. Formats .js, .json, and .feature files (via prettier-plugin-gherkin).

npm run format         # Write changes
npm run format:check   # Check only (CI)

Clone this wiki locally