11# Copilot Instructions
22
3- This GitHub Action is written in TypeScript and transpiled to JavaScript. Both
4- the TypeScript sources and the ** generated** JavaScript code are contained in
5- this repository. The TypeScript sources are contained in the ` src ` directory and
6- the JavaScript code is contained in the ` dist ` directory. A GitHub Actions
7- workflow checks that the JavaScript code in ` dist ` is up-to-date. Therefore, you
8- should not review any changes to the contents of the ` dist ` folder and it is
9- expected that the JavaScript code in ` dist ` closely mirrors the TypeScript code
10- it is generated from.
3+ This GitHub Action validates, lints, builds, and releases Obsidian plugins and
4+ themes. It is written in TypeScript and transpiled to JavaScript. Both the
5+ TypeScript sources and the ** generated** JavaScript code are contained in this
6+ repository. The TypeScript sources are contained in the ` src ` directory and the
7+ JavaScript code is contained in the ` dist ` directory. A GitHub Actions workflow
8+ checks that the JavaScript code in ` dist ` is up-to-date. Therefore, you should
9+ not review any changes to the contents of the ` dist ` folder and it is expected
10+ that the JavaScript code in ` dist ` closely mirrors the TypeScript code it is
11+ generated from.
1112
1213## Repository Structure
1314
@@ -22,6 +23,15 @@ it is generated from.
2223| ` badges/ ` | Badges for readme |
2324| ` dist/ ` | Generated JavaScript Code |
2425| ` src/ ` | TypeScript Source Code |
26+ | ` src/types.ts ` | Shared types and manifest interfaces |
27+ | ` src/detect.ts ` | Project type detection (plugin vs theme) |
28+ | ` src/manifest.ts ` | Manifest and versions.json validation |
29+ | ` src/repo-checks.ts ` | License and README validation |
30+ | ` src/build.ts ` | Build step auto-detection and execution |
31+ | ` src/lint.ts ` | Lint integration (user config and scanner rulesets) |
32+ | ` src/release.ts ` | Release asset validation, attestation, draft release |
33+ | ` src/main.ts ` | Action orchestrator |
34+ | ` src/index.ts ` | Entry point |
2535| ` .env.example ` | Environment Variables Example for ` @github/local-action ` |
2636| ` .licensed.yml ` | Licensed Configuration |
2737| ` .markdown-lint.yml ` | Markdown Linter Configuration |
@@ -71,15 +81,12 @@ npm run bundle
7181- Follow standard TypeScript and JavaScript coding conventions and best
7282 practices
7383- Changes should maintain consistency with existing patterns and style
74- - Document changes clearly and thoroughly, including updates to existing
75- comments when appropriate
7684- Do not include basic, unnecessary comments that simply restate what the code
7785 is doing (focus on explaining _ why_ , not _ what_ )
7886- Use consistent error handling patterns throughout the codebase
7987- Use TypeScript's type system to ensure type safety and clarity
8088- Keep functions focused and manageable
8189- Use descriptive variable and function names that clearly convey their purpose
82- - Use JSDoc comments to document functions, classes, and complex logic
8390- After doing any refactoring, ensure to run ` npm run test ` to ensure that all
8491 tests still pass and coverage requirements are met
8592- When suggesting code changes, always opt for the most maintainable approach.
0 commit comments