feat: add json schema for bslint.json #105
feat: add json schema for bslint.json #105bartvandenende-wm wants to merge 4 commits intorokucommunity:masterfrom
Conversation
36db77e to
7e6c4d0
Compare
TwitchBronBron
left a comment
There was a problem hiding this comment.
Hey, thanks for this.
I know it's slightly more work to keep the typescript interface and the schema in sync, but I'm not crazy about removing the interface from typescript and having it be generated, as that adds extra complexity when understanding how the project works (and we have so few contributors as it is).
Let's eliminate the src/generated concept and just maintain the schema and typescript interfaces separately. If you wanted, you could add a validation step that fails the build if the schema and interface are out of sync (which prevents us from releasing when they're out of sync).
1d52e5d to
1604b72
Compare
that's OK, note there is probably still opportunity to unify the TS types of
I added a test to validate both the |
Summary
feat: add json schema for bslint.json and generate types from it
Details
bslint.schema.jsongiven the current supported properties and types supported by bslintusesjson2tsto auto generate the types from the schema to prevent duplicate maintenance.add a npm prebuild step to ensure types are generated before TSC compilationsolves #104
How it was tested
npm run buildandnpm run testin this project