Fix lint errors in our npm scripts (#159501)

This commit is contained in:
Matt Bierner 2022-08-29 15:35:23 -07:00 committed by GitHub
parent 0d690b3a8f
commit 71c216d91f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@
"lib": [ "lib": [
"ES2020" "ES2020"
], ],
"module": "node12", "module": "node16",
"checkJs": true, "checkJs": true,
"noEmit": true "noEmit": true
} }

View file

@ -6,7 +6,7 @@
import { spawn as _spawn } from 'child_process'; import { spawn as _spawn } from 'child_process';
import { readdirSync, readFileSync } from 'fs'; import { readdirSync, readFileSync } from 'fs';
import { join } from 'path'; import { join } from 'path';
import url from 'url' import url from 'url';
async function spawn(cmd, args, opts) { async function spawn(cmd, args, opts) {
return new Promise((c, e) => { return new Promise((c, e) => {
@ -20,7 +20,7 @@ async function main() {
for (const extension of readdirSync('extensions')) { for (const extension of readdirSync('extensions')) {
try { try {
let packageJSON = JSON.parse(readFileSync(join('extensions', extension, 'package.json')).toString()); const packageJSON = JSON.parse(readFileSync(join('extensions', extension, 'package.json')).toString());
if (!(packageJSON && packageJSON.scripts && packageJSON.scripts['update-grammar'])) { if (!(packageJSON && packageJSON.scripts && packageJSON.scripts['update-grammar'])) {
continue; continue;
} }