dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Include schema.json with npm package
Hi, I am working on an eslint plugin for dprint. Right now, I copy the schema manually to my package, but it would be great if it could come bundled with the @dprint/typescript npm package.
@jgeurts what are you using the schema for? Also, what would a dprint eslint plugin do?
For some tools you can just provide the schema url, which is in the format:
https://plugins.dprint.dev/dprint/dprint-plugin-typescript/0.62.0/schema.json
You can get the version from the formatter by doing formatter.getPluginInfo().version, but actually I think you can just do formatter.getPluginInfo().configSchemaUrl to get the url.
Hi @dsherret, I'm using the schema is used to describe options for the eslint rule. The goal with the eslint rule is to allow dprint to run as part of the eslint process. It would be a similar thing as the prettier eslint plugin.
Thanks for the heads up on the schema url! I'll give that a shot!