test: enable linting of ts-smoke and fix all issues (#37322)

This commit is contained in:
Milan Burda 2023-02-17 19:56:09 +01:00 committed by GitHub
parent ee87438d28
commit e34cc6f48c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 495 additions and 478 deletions

View file

@ -1,18 +1,18 @@
const path = require('path')
const childProcess = require('child_process')
const path = require('path');
const childProcess = require('child_process');
const typeCheck = () => {
const tscExec = path.resolve(require.resolve('typescript'), '../../bin/tsc')
const tscExec = path.resolve(require.resolve('typescript'), '../../bin/tsc');
const tscChild = childProcess.spawn(process.execPath, [tscExec, '--project', './ts-smoke/tsconfig.json'], {
cwd: path.resolve(__dirname, '../')
})
tscChild.stdout.on('data', d => console.log(d.toString()))
tscChild.stderr.on('data', d => console.error(d.toString()))
});
tscChild.stdout.on('data', d => console.log(d.toString()));
tscChild.stderr.on('data', d => console.error(d.toString()));
tscChild.on('exit', (tscStatus) => {
if (tscStatus !== 0) {
process.exit(tscStatus)
process.exit(tscStatus);
}
})
}
});
};
typeCheck()
typeCheck();