@nodeve/checks 4.0.1 → 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.
package/README.md CHANGED
@@ -41,19 +41,19 @@ Copy `node_modules/@nodeve/checks/nodeve.checks.defaults.js` to your repo root a
41
41
  | Check | What it gates | Default |
42
42
  | - | - | - |
43
43
  | `doc-tokens` | markdown over a line/token budget | on (every tracked `.md`; an index gets half the tokens) |
44
- | `reshape` | callbacks that reproduce their input shape (no-op / pick / clone) | on (`apps/`, `packages/`) |
45
- | `plural-arrays` | count-plural names bound to a map/object instead of an array | on (`apps/`, `packages/`) |
46
- | `inline-dupes` | non-exported top-level names declared in 2+ files | on (`apps/`, `packages/`) |
44
+ | `reshape` | callbacks that reproduce their input shape (no-op / pick / clone) | on (tree-wide `.ts`) |
45
+ | `plural-arrays` | count-plural names bound to a map/object instead of an array | on (tree-wide `.ts`) |
46
+ | `inline-dupes` | non-exported top-level names declared in 2+ files | on (tree-wide `.ts`) |
47
47
  | `helper-collisions` | local helpers that fuzzily match a dependency export | on (needs lib-names index) |
48
- | `clones` | structural copy-paste (duplicated code blocks) via jscpd v5 | on (`apps/`, `packages/`; no-op without the jscpd binary) |
48
+ | `clones` | structural copy-paste (duplicated code blocks) via jscpd v5 | on (tree-wide ts/js/rs/py) |
49
49
  | `page-size` | files over a per-glob line budget | on (`*+page.svelte` >280; no-op where nothing matches) |
50
- | `file-size` | TS sources over a line budget (warn >225, fail >300) | on (`apps/`, `packages/`) |
50
+ | `file-size` | source over a line budget (warn >225, fail >300) | on (tree-wide `.ts .js .mjs .svelte .rs .py`) |
51
51
  | `catalog` | dependency versions not single-sourced from a workspace catalog | on (a workspace must declare a catalog) |
52
52
  | `require-deps` | org-required deps missing from the workspace catalog | on (`remeda`; set `deps: []` to opt out) |
53
53
  | `require-eslint` | repo ships no root eslint flat config (eslint is org-mandatory) | on (`requireEslint: { enforce: false }` opts out) |
54
54
  | `commit-msg` | commit message off Conventional Commits, or a sizeable change lacking a body | on (`commit-msg` hook; body required past 50 changed lines) |
55
55
 
56
- Per-check semantics, tuning, and examples: **[docs/checks.md](docs/checks.md)**. Run any as `nodeve-check <name>`; each also has a standalone `nodeve-check-<name>` bin (identical behavior) for direct invocation.
56
+ Per-check semantics, tuning, and examples: **[docs/checks.md](docs/checks.md)**. Each check also has a standalone `nodeve-check-<name>` bin.
57
57
 
58
58
  ## Prose gate (Vale)
59
59
 
@@ -38,21 +38,25 @@ declare const _default: {
38
38
  };
39
39
  reshape: {
40
40
  globs: string[];
41
+ ignore: string[];
41
42
  allowlist: never[];
42
43
  };
43
44
  pluralArrays: {
44
45
  globs: string[];
46
+ ignore: string[];
45
47
  plural: never[];
46
48
  singular: string[];
47
49
  allowlist: never[];
48
50
  };
49
51
  inlineDupes: {
50
52
  globs: string[];
53
+ ignore: string[];
51
54
  allowlist: never[];
52
55
  includeExported: false;
53
56
  };
54
57
  helperCollisions: {
55
58
  globs: string[];
59
+ ignore: string[];
56
60
  libs: string[];
57
61
  libKeywords: {};
58
62
  aliases: {
@@ -90,6 +94,7 @@ declare const _default: {
90
94
  };
91
95
  fileSize: {
92
96
  globs: string[];
97
+ ignore: string[];
93
98
  warn: {
94
99
  maxLines: number;
95
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/lib/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAqImB"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/lib/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAyJmB"}
@@ -62,8 +62,11 @@ export default {
62
62
  maxSubjectLength: 72,
63
63
  bodyRequiredOverLines: 50,
64
64
  },
65
+ // The four AST checks below parse with the TypeScript compiler, so their scope
66
+ // is TS tree-wide — not per-layout. Declarations are machine output.
65
67
  reshape: {
66
- globs: ['apps/*.ts', 'packages/*.ts'],
68
+ globs: ['*.ts'],
69
+ ignore: ['**/*.d.ts'],
67
70
  allowlist: [],
68
71
  },
69
72
  // On by default: a count-plural name must hold an array, not a map/object (a
@@ -72,20 +75,23 @@ export default {
72
75
  // `singular` is seeded with `-s` nouns pluralize over-counts that are almost
73
76
  // never arrays (payloads/values, not lists).
74
77
  pluralArrays: {
75
- globs: ['apps/*.ts', 'packages/*.ts'],
78
+ globs: ['*.ts'],
79
+ ignore: ['**/*.d.ts'],
76
80
  plural: [],
77
81
  singular: ['data', 'metadata', 'series', 'news'],
78
82
  allowlist: [],
79
83
  },
80
84
  inlineDupes: {
81
- globs: ['apps/*.ts', 'packages/*.ts'],
85
+ globs: ['*.ts'],
86
+ ignore: ['**/*.d.ts'],
82
87
  allowlist: [],
83
88
  // Off by default: an app repo legitimately repeats exported route handlers per route.
84
89
  // A library-only repo (no route files) sets this true to catch exported dupes too.
85
90
  includeExported: false,
86
91
  },
87
92
  helperCollisions: {
88
- globs: ['apps/*.ts', 'packages/*.ts'],
93
+ globs: ['*.ts'],
94
+ ignore: ['**/*.d.ts'],
89
95
  libs: ['remeda'],
90
96
  libKeywords: {},
91
97
  // Seeded with the lodash→remeda renames (keyed by the remeda export). The org
@@ -109,12 +115,23 @@ export default {
109
115
  threshold: 0.8,
110
116
  allowlist: [],
111
117
  },
112
- // On by default: structural copy-paste detection (jscpd v5). No-ops if the
113
- // jscpd binary isn't installed. `apps/` is skipped when absent.
118
+ // On by default: structural copy-paste detection (jscpd v5) over the whole
119
+ // tree in every org language; `ignore` keeps build output and vendored trees out.
114
120
  clones: {
115
- paths: ['apps', 'packages'],
116
- formats: ['typescript', 'javascript'],
117
- ignore: ['**/node_modules/**', '**/dist/**', '**/*.d.ts', '**/*.test.ts', '**/*.spec.ts'],
121
+ paths: ['.'],
122
+ formats: ['typescript', 'javascript', 'rust', 'python'],
123
+ ignore: [
124
+ '**/node_modules/**',
125
+ '**/dist/**',
126
+ '**/build/**',
127
+ '**/.svelte-kit/**',
128
+ '**/target/**',
129
+ '**/.venv/**',
130
+ '**/__pycache__/**',
131
+ '**/*.d.ts',
132
+ '**/*.test.ts',
133
+ '**/*.spec.ts',
134
+ ],
118
135
  minTokens: 50,
119
136
  minLines: 5,
120
137
  mode: 'mild',
@@ -128,10 +145,13 @@ export default {
128
145
  globs: [],
129
146
  overrides: [{ glob: '*+page.svelte', tiers: { fail: { maxLines: 280 } } }],
130
147
  },
131
- // On by default: warn past 225 lines, block past 300. Give a long-but-cohesive
132
- // file a bigger budget (or `tiers: 'exempt'`) via `overrides`, per repo.
148
+ // On by default: warn past 225 lines, block past 300. Whole tree, every source
149
+ // language the org writes — a repo's layout (`src/`, `apps/`, `packages/`) never
150
+ // decides whether the budget applies. Give a long-but-cohesive file a bigger
151
+ // budget (or `tiers: 'exempt'`) via `overrides`, per repo.
133
152
  fileSize: {
134
- globs: ['apps/*.ts', 'packages/*.ts'],
153
+ globs: ['*.ts', '*.js', '*.mjs', '*.svelte', '*.rs', '*.py'],
154
+ ignore: ['**/*.d.ts'],
135
155
  warn: { maxLines: 225 },
136
156
  fail: { maxLines: 300 },
137
157
  overrides: [],
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/lib/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,eAAe;IACd,gFAAgF;IAChF,8EAA8E;IAC9E,6EAA6E;IAC7E,8EAA8E;IAC9E,+EAA+E;IAC/E,yEAAyE;IACzE,8BAA8B;IAC9B,EAAE;IACF,2EAA2E;IAC3E,gFAAgF;IAChF,6EAA6E;IAC7E,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AQ,EAAE;QACT,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;KAC1E;IACD,+EAA+E;IAC/E,iFAAiF;IACjF,6EAA6E;IAC7E,2DAA2D;IAC3D,QAAQ,EAAE;QACT,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC;QAC5D,MAAM,EAAE,CAAC,WAAW,CAAC;QACrB,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;QACvB,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;QACvB,SAAS,EAAE,EAAE;KACb;IACD,oFAAoF;IACpF,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;IACzC,oFAAoF;IACpF,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE;IACjC,wEAAwE;IACxE,sEAAsE;IACtE,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAChC,+BAA+B;IAC/B,cAAc,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,6BAA6B,EAAE;CACtD,CAAC"}
@@ -102,7 +102,7 @@ pre-commit:
102
102
  run: node_modules/.bin/nodeve-check page-size {staged_files}
103
103
 
104
104
  - name: file-size
105
- glob: '*.{ts,yaml}'
105
+ glob: '*.{ts,js,mjs,svelte,rs,py}'
106
106
  run: node_modules/.bin/nodeve-check file-size {staged_files}
107
107
 
108
108
  # Whole-tree property — every manifest's deps must single-source from a
@@ -62,8 +62,11 @@ export default {
62
62
  maxSubjectLength: 72,
63
63
  bodyRequiredOverLines: 50,
64
64
  },
65
+ // The four AST checks below parse with the TypeScript compiler, so their scope
66
+ // is TS tree-wide — not per-layout. Declarations are machine output.
65
67
  reshape: {
66
- globs: ['apps/*.ts', 'packages/*.ts'],
68
+ globs: ['*.ts'],
69
+ ignore: ['**/*.d.ts'],
67
70
  allowlist: [],
68
71
  },
69
72
  // On by default: a count-plural name must hold an array, not a map/object (a
@@ -72,20 +75,23 @@ export default {
72
75
  // `singular` is seeded with `-s` nouns pluralize over-counts that are almost
73
76
  // never arrays (payloads/values, not lists).
74
77
  pluralArrays: {
75
- globs: ['apps/*.ts', 'packages/*.ts'],
78
+ globs: ['*.ts'],
79
+ ignore: ['**/*.d.ts'],
76
80
  plural: [],
77
81
  singular: ['data', 'metadata', 'series', 'news'],
78
82
  allowlist: [],
79
83
  },
80
84
  inlineDupes: {
81
- globs: ['apps/*.ts', 'packages/*.ts'],
85
+ globs: ['*.ts'],
86
+ ignore: ['**/*.d.ts'],
82
87
  allowlist: [],
83
88
  // Off by default: an app repo legitimately repeats exported route handlers per route.
84
89
  // A library-only repo (no route files) sets this true to catch exported dupes too.
85
90
  includeExported: false,
86
91
  },
87
92
  helperCollisions: {
88
- globs: ['apps/*.ts', 'packages/*.ts'],
93
+ globs: ['*.ts'],
94
+ ignore: ['**/*.d.ts'],
89
95
  libs: ['remeda'],
90
96
  libKeywords: {},
91
97
  // Seeded with the lodash→remeda renames (keyed by the remeda export). The org
@@ -109,12 +115,23 @@ export default {
109
115
  threshold: 0.8,
110
116
  allowlist: [],
111
117
  },
112
- // On by default: structural copy-paste detection (jscpd v5). No-ops if the
113
- // jscpd binary isn't installed. `apps/` is skipped when absent.
118
+ // On by default: structural copy-paste detection (jscpd v5) over the whole
119
+ // tree in every org language; `ignore` keeps build output and vendored trees out.
114
120
  clones: {
115
- paths: ['apps', 'packages'],
116
- formats: ['typescript', 'javascript'],
117
- ignore: ['**/node_modules/**', '**/dist/**', '**/*.d.ts', '**/*.test.ts', '**/*.spec.ts'],
121
+ paths: ['.'],
122
+ formats: ['typescript', 'javascript', 'rust', 'python'],
123
+ ignore: [
124
+ '**/node_modules/**',
125
+ '**/dist/**',
126
+ '**/build/**',
127
+ '**/.svelte-kit/**',
128
+ '**/target/**',
129
+ '**/.venv/**',
130
+ '**/__pycache__/**',
131
+ '**/*.d.ts',
132
+ '**/*.test.ts',
133
+ '**/*.spec.ts',
134
+ ],
118
135
  minTokens: 50,
119
136
  minLines: 5,
120
137
  mode: 'mild',
@@ -128,10 +145,13 @@ export default {
128
145
  globs: [],
129
146
  overrides: [{ glob: '*+page.svelte', tiers: { fail: { maxLines: 280 } } }],
130
147
  },
131
- // On by default: warn past 225 lines, block past 300. Give a long-but-cohesive
132
- // file a bigger budget (or `tiers: 'exempt'`) via `overrides`, per repo.
148
+ // On by default: warn past 225 lines, block past 300. Whole tree, every source
149
+ // language the org writes — a repo's layout (`src/`, `apps/`, `packages/`) never
150
+ // decides whether the budget applies. Give a long-but-cohesive file a bigger
151
+ // budget (or `tiers: 'exempt'`) via `overrides`, per repo.
133
152
  fileSize: {
134
- globs: ['apps/*.ts', 'packages/*.ts'],
153
+ globs: ['*.ts', '*.js', '*.mjs', '*.svelte', '*.rs', '*.py'],
154
+ ignore: ['**/*.d.ts'],
135
155
  warn: { maxLines: 225 },
136
156
  fail: { maxLines: 300 },
137
157
  overrides: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodeve/checks",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "Org-wide commit-gate checks (doc budgets, reshape/dup/helper smells, page size) and helper-index generators, driven by a per-repo config file and wired through lefthook.",
5
5
  "license": "MIT",
6
6
  "repository": {