| name | dev-workflow |
|---|---|
| description | Local build, test, lint, coverage, TypeScript layout, ESLint, and oclif-generated docs for contentstack-cli-content-type. Use when changing package.json scripts, tsconfig, .eslintrc, Jest config, README/oclif manifest, or validating before a PR. |
- Running or changing npm scripts (
test,test:coverage,posttest,prepack,version). - Editing
tsconfig.json,.eslintrc, orjest.config.js. - Regenerating
README.mdoroclif.manifest.jsonafter command or flag changes. - Checking expectations before opening a PR (tests + lint + coverage).
- Run
npm test; fix failures before review. npm run posttestruns ESLint on.tsfiles per package.json (eslint . --ext .ts --config .eslintrc). Keep it green when shipping changes.- When changing behavior in
src/core/orsrc/utils/, runnpm run test:coverageand ensure coverage meets jest.config.js global thresholds (see AGENTS.md). - After changing command IDs, flags, or descriptions, regenerate CLI docs with
npm run prepackor theversionscript soREADME.mdandoclif.manifest.jsonstay aligned.
- Preserve
tsconfig.json:strict: true,rootDir: src,outDir: lib,module: commonjs,target: es2017. - Changes to
include,compilerOptions.paths, orrootDir/outDiraffect the whole package and publishedlib/output—validate withtsc -b(as inprepack). - Source of truth for app code is
src/; compiled JS lives underlib/(do not hand-editlib/).
- Config extends oclif-typescript and
@typescript-eslint/recommended(see.eslintrc). - Notable conventions: single quotes,
eqeqeqsmart,@typescript-eslint/no-unused-vars(args none),no-var. New rule overrides should not breaknpm run posttest. - Prefer fixing lint in
src/andtests/rather than disabling rules project-wide without team agreement.
README.mdcommand sections andoclif.manifest.jsonare generated byoclif readmeandoclif manifest(see package.jsonprepack,version).- Prefer changing
src/commands/**/*.ts(descriptions, flags, examples), then runnpm run prepackor the relevantoclifscript so README and manifest stay consistent—avoid hand-editing generated command blocks unless you regenerate immediately after.
This repository’s .github/workflows includes policy scans, SCA, release automation, and issue integration—there is no dedicated workflow that only runs npm test. Align local validation with team expectations and any checks run on merge.
- AGENTS.md — entry point, scripts table, coverage summary.
- testing/SKILL.md — Jest layout, mocks, conventions.
- contentstack-cli-content-type/SKILL.md — plugin architecture and
prepackcontext. - oclif (external).