eslint (w/ prettier) pre-commit is not checking cypress code
Description
Discovered following investigation that created !29 (merged) :
pre-commit's eslint
task is only checking files in src
folder. Also npm run lint-ci
(and lint-fix
) only check src
folder too.
We should be checking all code. There are a number of failures with the existing code that should be resolved.
Something else to consider: It may be easier to have a separate prettier
check outside the eslint
check?
Further details
Current issues with cypress
code:
warn @typescript-eslint/no-unused-vars 'config' is defined but never used. .../frontend/cypress/plugins/index.js:1:23
error @typescript-eslint/no-namespace ES2015 module syntax is preferred over namespaces. .../frontend/cypress/support/component.ts:29:3
warn @typescript-eslint/no-unused-vars 'Subject' is defined but never used. .../frontend/cypress/support/index.d.ts:2:23
error @typescript-eslint/no-explicit-any Unexpected any. Specify a different type. .../frontend/cypress/support/index.d.ts:7:29
error @typescript-eslint/no-explicit-any Unexpected any. Specify a different type. .../frontend/cypress/support/index.d.ts:7:45
warn @typescript-eslint/no-unused-vars 'Subject' is defined but never used. .../frontend/cypress/support/index.d.ts:21:23
error @typescript-eslint/no-explicit-any Unexpected any. Specify a different type. .../frontend/cypress/support/index.d.ts:22:54
Task list
-
Ensure cypress code is checked by eslint and prettier in both pre-commit and Gitlab CI
Acceptance criteria
-
All source code in this repo is being linted and "prettiered"
Edited by Robin Goodall