feat(new tool): JSON Linter

Fix part of #605
This commit is contained in:
sharevb 2024-04-28 12:51:16 +02:00 committed by ShareVB
parent 75269c8cd7
commit 9390435366
5 changed files with 51 additions and 22 deletions

11
src/tools/json-linter/jsonlint-mod.d.ts vendored Normal file
View file

@ -0,0 +1,11 @@
declare module 'jsonlint-mod'{
/**
* Parse a JSON string to Typescript Object. If there is an error will print it
* as human readible.
*
* Please use `import * as jsonlint from 'jsonlint';`. Instead of,
* `import {parse} from 'jsonlint';`. Otherwise, it cannot reference to the
* correct instance.
*/
export function parse(str: string): Record<string, unknown>;
}