microsoft/hve-core

Public

mirrored from https://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
main

Branches

Tags

294Branches29Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Commit

build(settings): add JSON output formatter for markdownlint-cli2 (#1382)

# Pull Request

## Description

`npm run lint:md` previously produced only console output, so markdown
lint results were lost after the terminal session ended. This PR wires
up `markdownlint-cli2`'s official JSON formatter so runs also emit
`logs/markdownlint-results.json`, matching the structured log pattern
already used by other linters in this repo.

Changes included in this PR:

- `package.json` and `package-lock.json`: add
`markdownlint-cli2-formatter-json@0.0.9` as a dev dependency.
- `.markdownlint-cli2.jsonc`: configure `outputFormatters` to write
`logs/markdownlint-results.json`.

No script changes are required because `markdownlint-cli2` loads
configured formatters automatically, and `logs/` is already ignored by
git.

## Related Issue(s)

Closes #990.

## Type of Change

Select all that apply:

**Code & Documentation:**

* [ ] Bug fix (non-breaking change fixing an issue)
* [ ] New feature (non-breaking change adding functionality)
* [ ] Breaking change (fix or feature causing existing functionality to
change)
* [ ] Documentation update

**Infrastructure & Configuration:**

* [ ] GitHub Actions workflow
* [x] Linting configuration (markdown, PowerShell, etc.)
* [ ] Security configuration
* [ ] DevContainer configuration
* [x] Dependency update

**AI Artifacts:**

* [ ] Reviewed contribution with `prompt-builder` agent and addressed
all feedback
* [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
* [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
* [ ] Copilot agent (`.github/agents/*.agent.md`)
* [ ] Copilot skill (`.github/skills/*/SKILL.md`)

> Note for AI Artifact Contributors:
>
> * Agents: Research, indexing/referencing other project (using standard
VS Code GitHub Copilot/MCP tools), planning, and general implementation
agents likely already exist. Review `.github/agents/` before creating
new ones.
> * Skills: Must include both bash and PowerShell scripts. See
[Skills](../docs/contributing/skills.md).
> * Model Versions: Only contributions targeting the **latest Anthropic
and OpenAI models** will be accepted. Older model versions (e.g.,
GPT-3.5, Claude 3) will be rejected.
> * See [Agents Not
Accepted](../docs/contributing/custom-agents.md#agents-not-accepted) and
[Model Version
Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements).

**Other:**

* [ ] Script/automation (`.ps1`, `.sh`, `.py`)
* [ ] Other (please describe):

## Testing

- `mkdir -p logs && npm run lint:md`
- Verified that `logs/markdownlint-results.json` is created.
- Verified that the output file is `[]` on a clean tree and that the
formatter schema matches the documented fields when violations exist.

## Checklist

### Required Checks

* [ ] Documentation is updated (if applicable)
* [x] Files follow existing naming conventions
* [x] Changes are backwards compatible (if applicable)
* [ ] Tests added for new functionality (if applicable)

### AI Artifact Contributions

* [ ] Used `/prompt-analyze` to review contribution
* [ ] Addressed all feedback from `prompt-builder` review
* [ ] Verified contribution follows common standards and type-specific
requirements

### Required Automated Checks

The following validation commands must pass before merging:

* [ ] Markdown linting: `npm run lint:md`
* [ ] Spell checking: `npm run spell-check`
* [ ] Frontmatter validation: `npm run lint:frontmatter`
* [ ] Skill structure validation: `npm run validate:skills`
* [ ] Link validation: `npm run lint:md-links`
* [ ] PowerShell analysis: `npm run lint:ps`
* [ ] Plugin freshness: `npm run plugin:generate`
* [ ] Docusaurus tests: `npm run docs:test`

## Security Considerations

* [x] This PR does not contain any sensitive or NDA information
* [ ] Any new dependencies have been reviewed for security issues
* [x] Security-related scripts follow the principle of least privilege

## Additional Notes

- This PR keeps the original issue context from #990 and the previous
verification details, but reformats them into the repo's PR template.
- The targeted verification above was run locally; the full
repository-wide automated checklist has not been re-run as part of this
description update.

---------

Co-authored-by: Bill Berry <WilliamBerryiii@users.noreply.github.com>
Co-authored-by: Katrien De Graeve <katriendg@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Changed files6Full changed-file index
Branches0Containing branches
Tags0Containing tags