Skip to content

lint: promote noMisplacedAssertion to error and fix all sites#188

Merged
ryukzak merged 1 commit into
python-example-decouplefrom
lint-misplaced-assertion
Jun 18, 2026
Merged

lint: promote noMisplacedAssertion to error and fix all sites#188
ryukzak merged 1 commit into
python-example-decouplefrom
lint-misplaced-assertion

Conversation

@ryukzak

@ryukzak ryukzak commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Promotes the suspicious/noMisplacedAssertion Biome rule from warn to error, and fixes every offending site so make lint stays green.

Stacked on top of the python stack (base: python-fhirpy-default / #186).

Change

  • biome.json: noMisplacedAssertion "warn""error".
  • The rule flags expect() calls that aren't inside an it()/test() block. Several suites asserted at describe scope (setup-then-assert, or a describe body that was really a test). Each such assertion is now wrapped in an it() (or moved out of a setup helper).

32 sites across 7 files:

File sites
test/unit/typeschema/register.test.ts 10
test/api/write-generator/introspection.test.ts 6
test/unit/typeschema/ir/tree-shake.test.ts 6
test/api/write-generator/python.test.ts 3
test/api/write-generator/typescript.test.ts 3
test/api/mustache.test.ts 2
test/api/write-generator/csharp.test.ts 2

No behavior change

The assertions run exactly as before — just inside it() blocks now. Verified: biome check reports 0 noMisplacedAssertion (and 0 errors overall), the 111 tests across the 7 files pass, and tsc is clean.

Set suspicious/noMisplacedAssertion from warn to error in biome.json, then wrap every
describe-scope expect() in an it() block (the rule requires assertions inside it()/test()).
Touched the mustache/csharp/introspection/python/typescript writer tests and the register/
tree-shake unit tests. No behavior change — 111 tests still pass.
Base automatically changed from python-fhirpy-default to python-example-decouple June 18, 2026 19:50
@ryukzak ryukzak merged commit c7f9f4f into python-example-decouple Jun 18, 2026
30 checks passed
@ryukzak ryukzak deleted the lint-misplaced-assertion branch June 18, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant