lint-codeceptjs-tests
Installation
SKILL.md
Lint CodeceptJS 4 Tests
@codeceptjs/lint reads tests, page objects and helpers as an AST and reports the smells that make suites slow, flaky or leaky — fixed sleeps, if branching, raw fetch, missing await on grabbers, plain-text credentials, leftover .only/pause(). One finding per line; exit codes 0 / 1 (errors found) / 2 (bad input, unparsable file) drop straight into CI.
Commands
npx @codeceptjs/lint # files from codecept.conf.js in cwd
npx @codeceptjs/lint tests/ pages/login.js # explicit paths (no config needed)
npx @codeceptjs/lint -r no-pause -r no-only # only these rules (or --rules a,b)
npx @codeceptjs/lint rules # list rules + defaults
npx @codeceptjs/lint --json # file, line, column, rule, level, message, source
npx @codeceptjs/lint -c e2e/codecept.conf.js # config in another directory
Without paths it reads codecept.conf.js|ts|cjs|mjs and lints everything matched by tests, local include files (page objects, steps file) and helpers loaded via require. TypeScript is parsed with Node's type stripping (Node 22.13+); enum/namespace report as parse errors. A TS config importing ./x.js for an x.ts file (tsx convention) loads when the project has tsx installed.