Skip to content

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Apr 16, 2024
1 parent 72db67f commit d1e848f
Show file tree
Hide file tree
Showing 96 changed files with 348 additions and 402 deletions.
15 changes: 4 additions & 11 deletions .autorc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"plugins": [
"npm",
"conventional-commits",
"first-time-contributor",
"released"
],
"baseBranch": "stable",
"prereleaseBranches": [
"next"
],
"author": "GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>"
"plugins": ["npm", "conventional-commits", "first-time-contributor", "released"],
"baseBranch": "stable",
"prereleaseBranches": ["next"],
"author": "GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>"
}
69 changes: 29 additions & 40 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,31 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
//
// Helps with debugging parsing.
// - Set break points in the code
// - Open the file you want to parse: test/**/main.ts
// - F5 to run the debugger.
"name": "Debug Test Case",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": [
"--nolazy",
"-r",
"ts-node/register"
],
"args": [
"ts-json-schema-generator.ts",
"-p",
"${file}"
],
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": [
"<node_internals>/**",
"node_modules/**"
]
},
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"protocol": "inspector"
}
]
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
//
// Helps with debugging parsing.
// - Set break points in the code
// - Open the file you want to parse: test/**/main.ts
// - F5 to run the debugger.
"name": "Debug Test Case",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"args": ["ts-json-schema-generator.ts", "-p", "${file}"],
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": ["<node_internals>/**", "node_modules/**"]
},
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"protocol": "inspector"
}
]
}
14 changes: 7 additions & 7 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

To add/update a test case for generating a valid schema from a Typescript file:

- Look in `test/valid-data` for a sample related to your change. If you don't find one, create your own following the naming convention. For example, when adding the new sample `annotation-default`:
- Create folder `test/valid-data/annotation-default`
- Add `main.ts` to that folder with the type sample
- Update the corresponding `main.ts` file with your changes.
- Run `yarn test:update` to compile the JSON schema
- Add a test to `test/valid-data-annotations.test.ts`, matching a similar pattern to the existing tests.
- Run tests via `yarn jest test/valid-data-annotations.test.ts` (this only runs the subset of tests related to schema validation)
- Look in `test/valid-data` for a sample related to your change. If you don't find one, create your own following the naming convention. For example, when adding the new sample `annotation-default`:
- Create folder `test/valid-data/annotation-default`
- Add `main.ts` to that folder with the type sample
- Update the corresponding `main.ts` file with your changes.
- Run `yarn test:update` to compile the JSON schema
- Add a test to `test/valid-data-annotations.test.ts`, matching a similar pattern to the existing tests.
- Run tests via `yarn jest test/valid-data-annotations.test.ts` (this only runs the subset of tests related to schema validation)
2 changes: 0 additions & 2 deletions test/config/additional-properties/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface MixedInterface {
}
export type MixedAlias = PrivateInterface;


export type PublicAnonymousTypeLiteral = {
publicValue: string;
};
Expand All @@ -22,7 +21,6 @@ type PrivateAnonymousTypeLiteral = {
privateValue: string;
};


export interface MyObject {
exportInterface: ExportInterface;
exportAlias: ExportAlias;
Expand Down
4 changes: 1 addition & 3 deletions test/config/custom-formatter-configuration-override/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface MixedInterface {
}
export type MixedAlias = PrivateInterface;


export type PublicAnonymousTypeLiteral = {
publicValue: string;
};
Expand Down Expand Up @@ -42,6 +41,5 @@ export interface MyObject {
publicAnonymousTypeLiteral: PublicAnonymousTypeLiteral;
privateAnonymousTypeLiteral: PrivateAnonymousTypeLiteral;

exportedEnum: Direction
exportedEnum: Direction;
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface MixedInterface {
}
export type MixedAlias = PrivateInterface;


export type PublicAnonymousTypeLiteral = {
publicValue: string;
};
Expand Down Expand Up @@ -42,6 +41,5 @@ export interface MyObject {
publicAnonymousTypeLiteral: PublicAnonymousTypeLiteral;
privateAnonymousTypeLiteral: PrivateAnonymousTypeLiteral;

exportedEnum: Direction
exportedEnum: Direction;
}

Loading

0 comments on commit d1e848f

Please sign in to comment.