Skip to content

Commit 50c7f1a

Browse files
authored
chore(tsdoc): enable TSDoc linting (#577)
1 parent 9bbf0f5 commit 50c7f1a

File tree

7 files changed

+38
-7
lines changed

7 files changed

+38
-7
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
"plugin:prettier/recommended",
1010
"prettier/@typescript-eslint",
1111
],
12-
plugins: ["jest", "graphql"],
12+
plugins: ["jest", "graphql", "tsdoc"],
1313
env: {
1414
jest: true,
1515
node: true,
@@ -42,6 +42,7 @@ module.exports = {
4242
"no-await-in-loop": 0,
4343
"jest/no-focused-tests": 2,
4444
"jest/no-identical-title": 2,
45+
"tsdoc/syntax": 2,
4546

4647
// Rules that we should enable:
4748
"@typescript-eslint/no-use-before-define": "warn",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"eslint-plugin-graphql": "^3.0.3",
3232
"eslint-plugin-jest": "^22.5.1",
3333
"eslint-plugin-prettier": "^3.0.1",
34+
"eslint-plugin-tsdoc": "^0.2.0",
3435
"eslint_d": "^8.0.0",
3536
"graphql": ">=0.9 <0.14 || ^14.0.2",
3637
"jest": "^24.8.0",

packages/graphile-build-pg/src/plugins/PgConnectionArgOrderBy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type OrderBySpec =
2929
*
3030
* - true: `NULLS FIRST`
3131
* - false: `NULLS LAST`
32-
* - null: ``
32+
* - null: ` `
3333
*/
3434
boolean | null | undefined
3535
];

packages/graphile-build-pg/src/plugins/PgIntrospectionPlugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,7 @@ export default (async function PgIntrospectionPlugin(
508508
);
509509
};
510510
/**
511-
* @summary introspect database and get the table/view/constraints.
512-
* @returns {Promise<PgIntrospectionResultsByKind>}
511+
* Introspect database and get the table/view/constraints.
513512
*/
514513
async function introspect(): Promise<PgIntrospectionResultsByKind> {
515514
// Perform introspection

packages/graphile-build/src/makeNewBuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ export default function makeNewBuild(builder: SchemaBuilder): BuildBase {
11051105
newWithHooks,
11061106

11071107
/**
1108-
* @deprecated
1108+
* @deprecated Use `fieldDataGeneratorsByFieldNameByType` instead.
11091109
*/
11101110
fieldDataGeneratorsByType: fieldDataGeneratorsByFieldNameByType,
11111111

packages/postgraphile-core/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ export interface PostGraphileCoreOptions {
8686
build: Build,
8787
context: TContext
8888
) => boolean;
89+
8990
/**
90-
* @deprecated Use '@primaryKey' smart comment instead
91+
* @deprecated Use '\@primaryKey' smart comment instead
9192
*/
9293
viewUniqueKey?: string;
9394
enableTags?: boolean;

yarn.lock

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,20 @@
15861586
npmlog "^4.1.2"
15871587
write-file-atomic "^2.3.0"
15881588

1589+
"@microsoft/[email protected]":
1590+
version "0.12.16"
1591+
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc-config/-/tsdoc-config-0.12.16.tgz#88d85b84cbb959ac46fda5037ea71f2e4fe8c598"
1592+
integrity sha512-oSNFVSwkpE6wa/KFgPI+/hqYhFHcajNmQwA4uczQbhuKkyYYk9dIKKPVNdAFoduwuAX3Yy11vCPKFmhTBWP/8Q==
1593+
dependencies:
1594+
"@microsoft/tsdoc" "0.12.16"
1595+
ajv "~6.10.2"
1596+
resolve "~1.12.0"
1597+
1598+
"@microsoft/[email protected]":
1599+
version "0.12.16"
1600+
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.16.tgz#13869988581fddbdfdbcb92e26edc955fc6e00ca"
1601+
integrity sha512-SX8JNEVy6U5+56aQnQB8A2XK+WSF//b0kBa6KqxE48pcccqVuIu1ePAR/EWd1cQB6zWv26QIY5uv/++qm+Z3Mw==
1602+
15891603
"@mrmlnc/readdir-enhanced@^2.2.1":
15901604
version "2.2.1"
15911605
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -2060,7 +2074,7 @@ agentkeepalive@^3.4.1:
20602074
dependencies:
20612075
humanize-ms "^1.2.1"
20622076

2063-
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5:
2077+
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5, ajv@~6.10.2:
20642078
version "6.10.2"
20652079
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
20662080
integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==
@@ -3477,6 +3491,14 @@ eslint-plugin-prettier@^3.0.1:
34773491
dependencies:
34783492
prettier-linter-helpers "^1.0.0"
34793493

3494+
eslint-plugin-tsdoc@^0.2.0:
3495+
version "0.2.0"
3496+
resolved "https://registry.yarnpkg.com/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.0.tgz#b31d7a8d1a302a8e1afaa3e3b0f0837461df0a49"
3497+
integrity sha512-Ciei/N/95nCAqFUhAmN3FNq4r75GtQTFuNBKNOoT1m8OsxhPf+MoD5JJFbvssaaYU0K9jGEjbR/mVyUKg5hWJg==
3498+
dependencies:
3499+
"@microsoft/tsdoc" "0.12.16"
3500+
"@microsoft/tsdoc-config" "0.12.16"
3501+
34803502
eslint-scope@^4.0.0:
34813503
version "4.0.3"
34823504
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
@@ -7200,6 +7222,13 @@ [email protected], resolve@^1.10.0, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1:
72007222
dependencies:
72017223
path-parse "^1.0.6"
72027224

7225+
resolve@~1.12.0:
7226+
version "1.12.3"
7227+
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.3.tgz#96d5253df8005ce19795c14338f2a013c38a8c15"
7228+
integrity sha512-hF6+hAPlxjqHWrw4p1rF3Wztbgxd4AjA5VlUzY5zcTb4J8D3JK4/1RjU48pHz2PJWzGVsLB1VWZkvJzhK2CCOA==
7229+
dependencies:
7230+
path-parse "^1.0.6"
7231+
72037232
restore-cursor@^2.0.0:
72047233
version "2.0.0"
72057234
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"

0 commit comments

Comments
 (0)