-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add json schema for bslint.json #105
base: master
Are you sure you want to change the base?
feat: add json schema for bslint.json #105
Conversation
36db77e
to
7e6c4d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.json
given the current supported properties and types supported by bslintusesjson2ts
to 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 build
andnpm run test
in this project