@lzear/repo-lint 4.0.3 → 4.1.0

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.
Files changed (2) hide show
  1. package/README.md +83 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # @lzear/repo-lint
2
+
3
+ [![npm](https://img.shields.io/npm/v/@lzear/repo-lint)](https://www.npmjs.com/package/@lzear/repo-lint)
4
+ [![license](https://img.shields.io/npm/l/@lzear/repo-lint)](../../LICENSE)
5
+
6
+ Checks lzear repos against forge standards. Used internally by `forge check`.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install -D @lzear/repo-lint
12
+ # or
13
+ yarn add -D @lzear/repo-lint
14
+ ```
15
+
16
+ Requires Node ≥ 20.
17
+
18
+ ## CLI
19
+
20
+ ```sh
21
+ npx repo-lint # check current directory
22
+ ```
23
+
24
+ Most users should use `forge check` via [`@lzear/forge`](https://www.npmjs.com/package/@lzear/forge) instead.
25
+
26
+ ## Programmatic API
27
+
28
+ ```ts
29
+ import { checkLocal, checkRepo, CHECKS } from '@lzear/repo-lint'
30
+
31
+ // Check the current working directory
32
+ const report = await checkLocal()
33
+ console.log(report.results)
34
+ // [
35
+ // { pass: true, desc: 'README.md exists' },
36
+ // { pass: false, desc: 'publint (all published packages)', detail: '...' },
37
+ // ...
38
+ // ]
39
+
40
+ // Check a remote GitHub repo (clones via gh CLI)
41
+ const remote = await checkRepo('lzear/votes', { skipRemote: false })
42
+ ```
43
+
44
+ ### `checkLocal(options?)`
45
+
46
+ | Option | Type | Default | Description |
47
+ |---------------|-----------|---------|-----------------------------------|
48
+ | `skipRemote` | `boolean` | `false` | Skip GitHub secret checks |
49
+
50
+ Returns `Promise<RepoReport>`.
51
+
52
+ ### `RepoReport`
53
+
54
+ ```ts
55
+ interface RepoReport {
56
+ repo: string
57
+ results: { pass: boolean; desc: string; detail?: string }[]
58
+ }
59
+ ```
60
+
61
+ ## Checks performed
62
+
63
+ | Check | Description |
64
+ |--------------------------------|-------------------------------------------------------|
65
+ | `readme-exists` | `README.md` exists |
66
+ | `readme-npm-badge` | README has an npm badge |
67
+ | `readme-codacy-grade-badge` | README has Codacy grade badge |
68
+ | `readme-codacy-coverage-badge` | README has Codacy coverage badge |
69
+ | `editorconfig` | `.editorconfig` exists |
70
+ | `codacy-config` | `.codacy.yml` exists |
71
+ | `license` | `LICENSE` exists |
72
+ | `ci-workflow` | `.github/workflows/ci.yml` exists |
73
+ | `renovate` | `renovate.json` exists |
74
+ | `pkg-publint` | All published packages pass `publint` |
75
+ | `pkg-attw` | All published packages pass `attw` (ESM-only profile) |
76
+ | `pkg-knip` | No unused exports or dependencies (`knip`) |
77
+ | `deps-fresh` | All dependencies up to date (`ncu`) |
78
+ | `secret-npm-token` | GitHub secret `NPM_TOKEN` is set |
79
+ | `secret-codacy-token` | GitHub secret `CODACY_PROJECT_TOKEN` is set |
80
+
81
+ ## Part of forge
82
+
83
+ This package is part of [forge](https://github.com/lzear/forge) — shared dev tooling for lzear repos.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lzear/repo-lint",
3
- "version": "4.0.3",
3
+ "version": "4.1.0",
4
4
  "description": "Checks lzear repos against forge standards",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "publint": "^0.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@lzear/configs": "4.0.3",
38
+ "@lzear/configs": "4.1.0",
39
39
  "@types/node": "^25",
40
40
  "@vitest/coverage-v8": "^4",
41
41
  "tsup": "^8",