diff --git a/build/jsconfig.json b/build/jsconfig.json index a731bfcdfce512bade028325a5999a64572393c6..299294ef05588f6619a99ff5f9f72fda5ee9dc59 100644 --- a/build/jsconfig.json +++ b/build/jsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "target": "es2017", - "jsx": "preserve" + "jsx": "preserve", + "checkJs": true }, "include": [ "**/*.js" diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index 2aaa93528f5228ae6eb245000cc43918f5a08cd8..6df0b4ecb23a268c7ea5eb80928879a874f885bc 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -8,6 +8,10 @@ const path = require('path'); const fs = require('fs'); const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn'; +/** + * @param {string} location + * @param {*} [opts] + */ function yarnInstall(location, opts) { opts = opts || {}; opts.cwd = location; diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js index af2db363e6a0607a4e723f8fd0aa2dbf75e4b24e..3ff7254c3e2825c2283fd6f720830ca3a16a8f2b 100644 --- a/build/npm/update-all-grammars.js +++ b/build/npm/update-all-grammars.js @@ -7,6 +7,9 @@ const cp = require('child_process'); const fs = require('fs'); const path = require('path'); +/** + * @param {string} location + */ function updateGrammar(location) { const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; const result = cp.spawnSync(npm, ['run', 'update-grammar'], { diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index 988b7bc3795ccf7093d0c047c0d3aa2bcea14573..2ccd808e152bf0f0889d1f4e3ed9d70cc2480b9f 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -12,6 +12,9 @@ var cson = require('cson-parser'); var https = require('https'); var url = require('url'); +/** + * @param {string} urlString + */ function getOptions(urlString) { var _url = url.parse(urlString); var headers = { @@ -19,7 +22,7 @@ function getOptions(urlString) { }; var token = process.env['GITHUB_TOKEN']; if (token) { - headers['Authorization'] = 'token ' + token + headers['Authorization'] = 'token ' + token; } return { protocol: _url.protocol, @@ -30,6 +33,10 @@ function getOptions(urlString) { }; } +/** + * @param {string} url + * @param {number} redirectCount + */ function download(url, redirectCount) { return new Promise((c, e) => { var content = '';