v1.4.0: gRPC and Postman Support
Added
- gRPC (.proto) Linting: Introduced native static linting for Protocol Buffers using
protobufjs(new runtime dependency). - gRPC Native Rules: Added
require-rpc-comments,pascal-case-messages, andcamel-case-fields. - Postman Collections Linting: Introduced native static linting for Postman Collections (
v2.0.0andv2.1.0). - Postman Native Rules: Added
require-request-description,no-empty-folders, andrequire-response-example. - New Exported Functions:
lintGrpcSpecandlintPostmanSpecare now fully exported from the library API. - New Fixtures: Added
fixtures/sample-grpc.proto,fixtures/sample-grpc-clean.proto,fixtures/sample-postman.json, andfixtures/sample-postman-clean.jsonfor testing.
Fixed
- gRPC Parser bug:
protobufjswas loaded withoutalternateCommentMode: true, causing all method comments to be silently ignored. Therequire-rpc-commentsrule was firing on every method indiscriminately. Fixed by enablingalternateCommentModeinsrc/parsers/grpc.ts. - Interface inconsistency:
src/parsers/grpc.tsandsrc/parsers/postman.tswere returning custom interfaces (IGrpcParsedResult,IPostmanParsedResult) instead of the standard project interfaceIParsedSpec. Refactored to use the shared interface for consistency. - TypeScript type assertion: Added proper
as protobuf.Rootandas IPostmanCollectioncasts insrc/core/index.tsafter standardizing parsers toIParsedSpec, fixing TS2345 errors on build. - npm keywords: Added missing
grpc,protobuf,postman, andgraphqlkeywords topackage.json.
Tests
- gRPC test suite expanded:
lintGrpc.test.tswent from 1 test to 9 tests. Now matches the depth of OpenAPI/AsyncAPI suites: broken spec tests per rule (with specific message assertions), format detection, required fields check, and a full clean-spec passing test. - Postman test suite expanded:
lintPostman.test.tswent from 1 test to 10 tests. Includes a negative test verifying that a well-formed request (Get Users) does NOT trigger false positives. - detectSpecFormat tests: Added coverage for
.protoand Postman Collection detection.
Docs
- New:
docs/rules/grpc.md— full rules reference for gRPC in the same style asopenapi.md(with Triggers on / Clean examples for each rule). - New:
docs/rules/postman.md— full rules reference for Postman in the same style asopenapi.md. - Updated:
docs/README.md— added gRPC and Postman to the Rules Reference table. - Updated:
README.md— Features list now includes gRPC, Postman, and the Plugin System. Supported formats line now includes.proto. Rules Reference links updated. Roadmap updated to remove already-shipped 1.4.0 items.
📦 Installation
npm install -g @mrjacket/smileView Full CHANGELOG