-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to v1.0.5, strict type checks, generate types
Though a lot of changes, each one is relatively small, they're all thematically related, and all tests still pass. Note a lot of these descriptions also come from mbland/test-page-opener#23 or commit mbland/test-page-opener@01a79f6. - Added `settings.jsdoc.preferredTypes.Object = "object"` to .eslintrc to enable "Object.<..., ...>" syntax in a JSDoc `@typedef`. Got rid of some extra whitespaces in .eslintrc, too. - https://github.com/gajus/eslint-plugin-jsdoc/blob/b60cbb027b03b4f6d509933b0dca8681dbe47206/docs/rules/check-types.md#why-not-capital-case-everything - https://github.com/gajus/eslint-plugin-jsdoc/blob/b60cbb027b03b4f6d509933b0dca8681dbe47206/docs/settings.md#settings-to-configure-check-types-and-no-undefined-types - Updated jsconfig.json to specify: ```json "lib": [ "ES2022" ], "module": "node16", "target": "es2020", "strict": true, "exclude": [ "node_modules/**", "coverage*/**", "jsdoc/**" ] ``` The "lib", "modules", and "target" lines are to ensure compatibility with Node v18, and there's no more disabling `strictNullChecks` and `noImplicitAny` after `"strict": true`. Most of the changes in this commit are a result of removing those two options. - Added @types/{chai,node} to devDependencies and added a `pnpm typecheck` command. Now the whole project and its dependencies pass strict type checking. - Updated everything under test/ to be strictly TypeScript compliant. - Updated `pnpm test:ci` to incorporate `pnpm jsdoc` and `pnpm typecheck`. Added 'jsdoc' to devDependencies to enable this. - Added a `pnpm prepack` script to generate types and a package.json `"types"` entry. - Updated all local import paths to add '.js' or 'index.js' and added JSDoc comments everywhere reqired by `pnpm typecheck`. - Added null checks and corresponding tests everywhere reqired by `pnpm typecheck`.
- Loading branch information
Showing
17 changed files
with
583 additions
and
293 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,6 @@ node_modules/ | |
out/ | ||
pnpm-debug.log | ||
tmp/ | ||
types/ | ||
*.log | ||
*.tgz |
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 |
---|---|---|
|
@@ -55,7 +55,7 @@ Running the wrapper will generate the local `file://` URL to the generated | |
`index.html` file, e.g.: | ||
|
||
```text | ||
file:///path/to/jsdoc/output/jsdoc-cli-wrapper/1.0.4/index.html | ||
file:///path/to/jsdoc/output/jsdoc-cli-wrapper/1.0.5/index.html | ||
``` | ||
|
||
You can click on or copy this link to open it in your browser. You can also open | ||
|
@@ -99,10 +99,10 @@ This wrapper resolves both of these minor annoyances. | |
```sh | ||
$ pnpm jsdoc | ||
|
||
> [email protected].4 jsdoc /path/to/jsdoc-cli-wrapper | ||
> [email protected].5 jsdoc /path/to/jsdoc-cli-wrapper | ||
> node index.js -c jsdoc.json . | ||
|
||
file:///path/to/jsdoc-cli-wrapper/jsdoc/jsdoc-cli-wrapper/1.0.4/index.html | ||
file:///path/to/jsdoc-cli-wrapper/jsdoc/jsdoc-cli-wrapper/1.0.5/index.html | ||
``` | ||
|
||
Of course, your own project would use `jsdoc-cli-wrapper` instead of `node | ||
|
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,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"checkJs": true, | ||
"lib": [ | ||
"ES2022" | ||
], | ||
"module": "node16", | ||
"target": "es2020", | ||
"strict": true | ||
}, | ||
"exclude": [ | ||
"node_modules/**", | ||
"coverage/**", | ||
"jsdoc/**" | ||
] | ||
} |
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
Oops, something went wrong.