Skip to content

Commit

Permalink
chore: add @ts-check for scripts written in JavaScript (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Jul 16, 2020
1 parent b1a3975 commit b276ec1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/generate-clients/code-gen-dir.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const { join, normalize } = require("path");

const CODE_GEN_ROOT = normalize(join(__dirname, "..", "..", "codegen"));
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-clients/code-gen.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const path = require("path");
const { emptyDirSync } = require("fs-extra");
const { copyFileSync, readdirSync, lstatSync } = require("fs");
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-clients/code-prettify.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const { spawnProcess } = require("./spawn-process");

const prettifyCode = async (dir) => {
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-clients/copy-to-clients.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const { join } = require("path");
const { copySync, ensureDirSync } = require("fs-extra");
const { readdirSync, lstatSync, readFileSync, existsSync, writeFileSync } = require("fs");
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-clients/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const yargs = require("yargs");
const path = require("path");
const { emptyDirSync, rmdirSync } = require("fs-extra");
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-clients/spawn-process.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const { spawn } = require("child_process");

const spawnProcess = (command, args = [], options = {}) =>
Expand Down
2 changes: 2 additions & 0 deletions scripts/verdaccio-publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// Reference: https://github.com/aws/aws-encryption-sdk-javascript/pull/276

// @ts-check

const { spawn, execSync } = require("child_process");
const pipeStdIo = { stdio: [process.stdin, process.stdout, process.stderr] };

Expand Down

0 comments on commit b276ec1

Please sign in to comment.