Repository navigation
docs(skills): lint TWD tests with twd-lint, and trim the rules it now enforces - #19
Merged
Merged
Conversation
… enforces The twd skill runs npx twd-lint --fix on the files it writes, next to the type check, and states each rule once in positive form instead of repeating it as hard constraint, WRONG/RIGHT block and mistakes list. One top-level describe per file becomes a convention: the runner accepts several. setup adds twd-lint as an ESLint plugin when the project has a flat config, otherwise as a lint:twd script. ci-setup lints before any server starts. New eval twd-lint-fix; setup eval gains an ESLint config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires twd-lint 1.0.0 into the three common skills. The skills now teach each rule once, in positive form with an example, and the linter checks it, instead of the same rule repeated three times.
twd skill
npx twd-lint <files> --fix, next to the type check. It works with or without ESLint in the project, sotwd-patterns.mdis not consulted.allowed-toolsand the execution scope gainnpx twd-lint.NEVERrepeats removed. The API knowledge stays: themockRequestsignature, thatrule.requestis the body, and Chai-styleexpect.test-writing.md:describeper file is now a convention, not a hard constraint. The runner loops over every root suite, so "break the test runner" was false.testsobject.--fixon an existing file can make an un-awaited assertion run for the first time.setup skill
twd-lintand appendstwd.configs.recommendedto the config, including when it is wrapped indefineConfig/tseslint.config..eslintrc, Biome, oxlint): installstwd-lintand adds alint:twdscript.twd-js.@emnapilockfile bug.twd-patterns.md: gets aTest lintline andnpx twd-lint --fixunder Runner Commands.ci-setup skill
npm ci, in the Action template and both custom templates. The command isnpm run lint:twd, ornpx twd-lintwhen there is no script.eslint;Evals
twd-lint-fix: a test file with Vitest imports, missingawaits,it.onlyandrule.request.body. The skill must run twd-lint and leave the file clean.twd-flow-test:lint-attempted;flow-shapejudge criteria now name which calls are async. The judge had failed a correct file, readingtwd.should/twd.clear*as missingawait.setup-vite-react-query: the scaffold gains an ESLint 9 config (as in the Vite template), with a grader fortwd.configs.recommended.1 run each.
plugin validate --strictpasses. Plugin 1.3.3 → 1.3.4.Once twd#381 is merged, a follow-up can link https://twd.dev/linting from the skills.