Skip to content

Commit f0fdef4

Browse files
committed
Improve a few notes here & there
1 parent 7827890 commit f0fdef4

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ If requested to create a new plugin for a certain package/tool/framework:
142142
- Update the plugin's `types.ts`: add only relevant types, remove if unused.
143143
- Consult similar plugins and the tool's website to implement the plugin.
144144
- Update and fill out the blanks in the new files.
145-
- Don't forget: [run tests][18] individually first
145+
- Don't forget: [run tests][18] individually first.
146+
- Remove unused variables and empty arrays from the template.
146147

147148
[1]: https://knip.dev
148149
[2]: ./packages/knip/src/types/module-graph.ts

packages/knip/test/plugins/_template.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ test('Find dependencies with the __PLUGIN_NAME__ plugin', async () => {
1212
* Ideally, plugin tests have no `issues` left and only `total` and `processed` values in `counters`.
1313
* This means for instance that a dependency used in a file, is also listed in package.json, resulting in zero issues.
1414
*
15-
* See `binaries` issues? This is an integration test, Knip might search in `node_modules` for `package.json#bin`.
16-
* Either we accept the missing binaries and count them as issues (`binaries: [n]`), or we add 2 fixture files:
17-
* → `node_modules/package-name/package.json` with a `bin` pointing to an existing empty `./index.js` file
15+
* Missing binaries? Add: node_modules/pkg/package.json with bin → ./index.js
1816
*
19-
* Sometimes the "Publish preview & run ecosystem tests" workflow in CI (GitHub Action) fails, you can probably ignore.
20-
* All other workflows should be green though!
17+
* Failures in "Publish preview & run ecosystem tests" can usually be ignored, unless related to your changes.
18+
* All other workflows should be green though.
2119
*
22-
* Here's a link to the docs, just in case: https://knip.dev/writing-a-plugin
20+
* Docs: https://knip.dev/writing-a-plugin
2321
*
2422
* Please remove this comment! 🔥
2523
*/

0 commit comments

Comments
 (0)