Skip to content

v1.0.13

Choose a tag to compare

@cldmv-bot cldmv-bot released this 28 Sep 20:03
· 3 commits to master since this release
v1.0.13
2ce4e13

release: v1.0.13 - publish real types for the plugin, language and AST

@cldmv/eslint-plugin-jsonv v1.0.13 Changelog

Release Date: September 2026
Release Type: Patch
Branch: release/1.0.13


Overview

Version 1.0.13 makes the plugin's published types real. dist/index.d.mts used to declare the default export as a bare Object; it now types the plugin, the jsonv/jsonv language, JsonvSourceCode, and every AST node against @eslint/core's generics, and the JSDoc that generates those declarations is now type-checked in CI. The release also closes a gap the new types surfaced: engines.node and a missing eslint peer range now match what the plugin's runtime dependencies actually require. Alongside that, the plugin accepts three more @cldmv/jsonv language options, and the repository adopts the CLDMV lint/format tooling.

No configuration changes are required to pick this up — existing eslint.config.mjs files, rules, and languageOptions keep working unchanged.


🐛 Bug Fixes

Published types describe a real ESLint plugin (#30, fixes #28)

dist/index.d.mts declared const plugin: Object, so a TypeScript (or // @ts-check) config got no type for plugin.configs.recommended, plugin.languages.jsonv, or languageOptions, and nothing for a rule author to use for the AST node types the language exposes. The JSDoc in index.mjs is now typed against @eslint/core's Language, TextSourceCode, OkParseResult, and Plugin generics, the way @eslint/json types its JSON language, and tsconfig.types.json now type-checks it (checkJs: true) instead of only emitting from it. The package exports typedefs for every AST node (JsonvProgram, JsonvObjectExpression, JsonvProperty, JsonvLiteral, JsonvIdentifier, JsonvMemberExpression, JsonvTemplateLiteral, JsonvTemplateElement), for JsonvLanguageOptions, and for a rule's visitor (JsonvRuleDefinition, JsonvRuleVisitor), plus the JsonvSourceCode class itself, and JsonvSourceCode is now a named export alongside the default plugin. A new test:types script compiles a type-level consumer test against the built declarations the way an eslint.config.mts would, and build:ci runs it.

The declared Node floor and ESLint range match what the plugin needs (#37, fixes #32)

engines.node still said >=18.0.0, but the runtime dependencies added for real types — @eslint/core and @eslint/plugin-kit — both require ^20.19.0 || ^22.13.0 || >=24, and so does ESLint 10 itself. Installing on Node 18 could fail or warn while engines claimed support. engines.node now states that real floor, and a new eslint peer dependency (^9.13.0 || ^10.0.0) tells consumers which ESLint versions the plugin's languages API needs — ^9.13.0 is the first release with defaultLanguageOptions support for plugin languages.

mode, strictOctal, and allowInternalReferences language options (#39, fixes #34)

The README documented a mode option, and the plugin rejected it (Unknown language option "mode") because it was never actually forwarded to the parser. mode ("jsonv", "json5", or "json", default "jsonv"), strictOctal (boolean, default false), and allowInternalReferences (boolean, default true) are now accepted, validated, and passed through to both parseWithOptions() and parseToAst(), matching @cldmv/jsonv's own ParseOptions. reviver, preserveComments, and tolerant stay unsupported, and validateLanguageOptions now names the reason when one of those three is set instead of reporting it as merely unknown. The README's Configuration Options table documents all five options with their defaults, and a new test extracts the README's own languageOptions examples and runs them through validateLanguageOptions and a live Linter, so the docs and the code can't drift apart again.

🔧 CI & tooling

  • The CLDMV eslint + prettier config, lint / lint:fix / format / format:check scripts, and the .githooks pre-commit hook are added, and the existing sources and README are reformatted repo-wide (#38, fixes #33).
  • release-merge is re-armed on every check-producing workflow, instead of only the ones that existed when it was first wired (#40).
  • The v4 workflows are synced with the CLDMV/.github v4.29.2 templates (#42).
  • The bundle-size workflow is added, and the release-merge required-workflow list is restored to the full set (#43).

📚 Documentation

  • NEW: docs/changelog/v1/v1.0.13.md — this changelog.
  • README Installation now states the Node and ESLint requirements (#37).
  • README Configuration Options documents mode, strictOctal, and allowInternalReferences alongside year and strictBigInt (#39).

🔧 Dependencies

  • NEW runtime dependency: @eslint/core ^1.2.1, which provides the Language, TextSourceCode, and Plugin types the published declarations are built against (#30).
  • NEW dev dependency: @types/node ^26.6.3, needed by the type-checked JSDoc (#30).
  • NEW peer dependency: eslint ^9.13.0 || ^10.0.0 (#37).
  • NEW dev dependencies for lint/format: @cldmv/prettier-plugin-jsonv ^1.0.6, @eslint/css ^2.0.0, @eslint/js ^10.0.1, @eslint/json ^2.1.0, @eslint/markdown ^8.0.3, globals ^17.12.0, prettier ^3.9.9 (#38).

Upgrade notes

  • No breaking changes — this is a drop-in upgrade for existing configs.
  • If you're on Node below ^20.19.0/^22.13.0/24, or ESLint below 9.13.0, upgrade both: the new engines and eslint peer ranges now state a requirement the plugin's dependencies already carried since v1.0.12.
  • mode, strictOctal, and allowInternalReferences are opt-in language options with backward-compatible defaults — no existing languageOptions need to change.
  • If you consume the published types, the default export and its language are now real ESLint/@eslint/core types instead of Object; a config that previously cast around the missing types can drop the cast.

coverage

Metric Coverage
Statements 100.0%
Branches 100.0%
Functions 100.0%
Lines 100.0%

Avg: 100.0% · 43b8980 · Node lts/*

👥 Contributors