0.11.0 • Published 10 months ago

remark-lint-code-block-syntax v0.11.0

Weekly downloads
27
License
MIT
Repository
github
Last release
10 months ago

npm node

remark-lint-code-block-syntax

A remark-lint rule to check language syntax in a code block.

Supported languages

  • JavaScript
  • JSON
  • JSONC
  • JSON5
  • YAML
  • CSS

Install

npm install remark-lint-code-block-syntax

Usage

Via a command-line argument:

$ remark --use remark-lint-code-block-syntax
docs/config.md
  32:1-32:4  warning  Invalid JSON: Unexpected token a in JSON at position 128  code-block-syntax  remark-lint

Via a configuration file:

{
  "plugins": ["remark-lint-code-block-syntax"]
}

Via JavaScript API:

import { reporter } from "vfile-reporter";
import { remark } from "remark";
import remarkLintCodeBlockSyntax from "remark-lint-code-block-syntax";

main();

async function main() {
  const code = `
\`\`\`js
const sum = 1 +;
\`\`\`
`;
  const file = await remark().use(remarkLintCodeBlockSyntax).process(code);
  console.error(reporter(file));
}

Development

This section is for developers or maintainers.

Releasing

  1. Check out the latest code on your local repository
  2. Run npm version <next_version>
  3. Run git push --follow-tags
  4. Start editing a new GitHub release
  5. Chose the new tag
  6. Click Generate release notes
  7. Remove trivial change items from the release notes
  8. Click Save draft
  9. Double-check the draft release
  10. Click Publish release if you find no problems (GitHub Actions will start publishing automatically)
0.10.0

10 months ago

0.11.0

10 months ago

0.9.0

10 months ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

5 years ago