@zgeoff/oxlint-config 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -191,10 +191,10 @@ A `<name>.test.ts` or `<name>.test.tsx` file declares one function, `setupTest()
191
191
  as the testing skill requires. At module level the rule allows imports, `type` and `interface`
192
192
  declarations, one `setupTest` function declaration, and statements that call `test`, `test.each`,
193
193
  `test.skipIf` or `test.if`, or a chain of them, with `test` under its local alias when the
194
- `bun:test` import renames it. It reports every other statement: a `let`, a `var`, a class, an enum,
195
- a second function, an export, and a call such as `beforeEach(...)`. The message holds the three ways
196
- out of a helper: inline it, swap it for a registered matcher, or move it to the shared test utils
197
- with tests of its own.
194
+ `bun:test` or `claude-code/testing` import renames it. It reports every other statement: a `let`, a
195
+ `var`, a class, an enum, a second function, an export, and a call such as `beforeEach(...)`. The
196
+ message holds the three ways out of a helper: inline it, swap it for a registered matcher, or move
197
+ it to the shared test utils with tests of its own.
198
198
 
199
199
  A module-level `const` passes only as a skip gate: a declarator that binds at least one name, each
200
200
  binding read, and read only at collection time, inside an argument of the test runner's `skipIf` or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/oxlint-config",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Shareable oxlint config: strict categories, house-style rules, and a custom JS plugin",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -71,7 +71,9 @@ const setupTestOnly = {
71
71
  },
72
72
  };
73
73
 
74
- // the local names that `test` from `bun:test` goes by, so an aliased import
74
+ const testModules = new Set(['bun:test', 'claude-code/testing']);
75
+
76
+ // the local names that `test` from a test module goes by, so an aliased import
75
77
  // such as `import { test as check }` counts; a file that imports no `test`
76
78
  // reads the global one, unless a module binding of its own takes the name
77
79
  function collectTestNames(context, program) {
@@ -79,7 +81,7 @@ function collectTestNames(context, program) {
79
81
  .filter(
80
82
  (statement) =>
81
83
  statement.type === 'ImportDeclaration' &&
82
- statement.source.value === 'bun:test' &&
84
+ testModules.has(statement.source.value) &&
83
85
  statement.importKind !== 'type',
84
86
  )
85
87
  .flatMap((statement) => statement.specifiers)