-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses some actual other plugins, which could be brittle, but on the other hand, should give us greater confidence that it's working
- Loading branch information
Showing
6 changed files
with
437 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`imports-with-jsdoc.tsx - typescript-verify > imports-with-jsdoc.tsx 1`] = ` | ||
import z from 'z'; | ||
import threeLevelRelativePath from "../../../threeLevelRelativePath"; | ||
import sameLevelRelativePath from "./sameLevelRelativePath"; | ||
import thirdParty from "third-party"; | ||
import oneLevelRelativePath from "../oneLevelRelativePath"; | ||
import otherthing from "@core/otherthing"; | ||
import abc from "@core/abc"; | ||
import twoLevelRelativePath from "../../twoLevelRelativePath"; | ||
/** | ||
* function example description that was wrapped by hand | ||
* so it have more then one line and don't end with a dot | ||
* REPEATED TWO TIMES BECAUSE IT WAS EASIER to copy | ||
* function example description that was wrapped by hand | ||
* so it have more then one line. | ||
* @return {Boolean} Description for @returns with s | ||
* @param {String|Number} text - some text description that is very long and needs to be wrapped | ||
* @param {String} [defaultValue="defaultTest"] TODO | ||
* @arg {Number|Null} [optionalNumber] | ||
* @private | ||
*@memberof test | ||
@async | ||
* @examples | ||
* var one = 5 | ||
* var two = 10 | ||
* | ||
* if(one > 2) { two += one } | ||
* @undefiendTag\${" "} | ||
* @undefiendTag {number} name des | ||
*/ | ||
const TestFunction = (text: string | number, defaultValue: string, optionalNumber: number | Null): boolean => ( | ||
<div className="text-white px-4 sm:px-8 py-2 sm:py-3 bg-sky-700 hover:bg-sky-800"></div> | ||
) | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
import thirdParty from "third-party"; | ||
import z from "z"; | ||
import abc from "@core/abc"; | ||
import otherthing from "@core/otherthing"; | ||
import threeLevelRelativePath from "../../../threeLevelRelativePath"; | ||
import twoLevelRelativePath from "../../twoLevelRelativePath"; | ||
import oneLevelRelativePath from "../oneLevelRelativePath"; | ||
import sameLevelRelativePath from "./sameLevelRelativePath"; | ||
/** | ||
* Function example description that was wrapped by hand so it have more then | ||
* one line and don't end with a dot REPEATED TWO TIMES BECAUSE IT WAS EASIER to | ||
* copy function example description that was wrapped by hand so it have more | ||
* then one line. | ||
* | ||
* @async | ||
* @private | ||
* @memberof test | ||
* @example | ||
* var one = 5; | ||
* var two = 10; | ||
* | ||
* if (one > 2) { | ||
* two += one; | ||
* } | ||
* | ||
* @param {String | Number} text - Some text description that is very long and | ||
* needs to be wrapped | ||
* @param {String} [defaultValue="defaultTest"] TODO. Default is \`"defaultTest"\` | ||
* @param {Number | Null} [optionalNumber] | ||
* @returns {Boolean} Description for @returns with s | ||
* @undefiendTag\${" "} | ||
* @undefiendTag {number} name des | ||
*/ | ||
const TestFunction = ( | ||
text: string | number, | ||
defaultValue: string, | ||
optionalNumber: number | Null, | ||
): boolean => ( | ||
<div className="bg-sky-700 px-4 py-2 text-white hover:bg-sky-800 sm:px-8 sm:py-3"></div> | ||
); | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import z from 'z'; | ||
import threeLevelRelativePath from "../../../threeLevelRelativePath"; | ||
import sameLevelRelativePath from "./sameLevelRelativePath"; | ||
import thirdParty from "third-party"; | ||
import oneLevelRelativePath from "../oneLevelRelativePath"; | ||
import otherthing from "@core/otherthing"; | ||
import abc from "@core/abc"; | ||
import twoLevelRelativePath from "../../twoLevelRelativePath"; | ||
|
||
|
||
/** | ||
* function example description that was wrapped by hand | ||
* so it have more then one line and don't end with a dot | ||
* REPEATED TWO TIMES BECAUSE IT WAS EASIER to copy | ||
* function example description that was wrapped by hand | ||
* so it have more then one line. | ||
* @return {Boolean} Description for @returns with s | ||
* @param {String|Number} text - some text description that is very long and needs to be wrapped | ||
* @param {String} [defaultValue="defaultTest"] TODO | ||
* @arg {Number|Null} [optionalNumber] | ||
* @private | ||
*@memberof test | ||
@async | ||
* @examples | ||
* var one = 5 | ||
* var two = 10 | ||
* | ||
* if(one > 2) { two += one } | ||
* @undefiendTag${" "} | ||
* @undefiendTag {number} name des | ||
*/ | ||
const TestFunction = (text: string | number, defaultValue: string, optionalNumber: number | Null): boolean => ( | ||
<div className="text-white px-4 sm:px-8 py-2 sm:py-3 bg-sky-700 hover:bg-sky-800"></div> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {run_spec} from '../../test-setup/run_spec'; | ||
import * as plugin from '../../src'; | ||
|
||
run_spec(__dirname, ["typescript"], { | ||
// Note, this is the only order that works in tests, because tailwind looks for published plugins, | ||
// and jsdoc throws a maximum call stack size exceeded error if it comes after tailwind. | ||
plugins: [ | ||
'prettier-plugin-jsdoc', | ||
"prettier-plugin-tailwindcss", | ||
plugin, | ||
], | ||
importOrder: ['^@core/(.*)$', '^@server/(.*)', '^@ui/(.*)$', '^[./]'], | ||
|
||
}); |
Oops, something went wrong.