Setup prettier and eslint and run pre-commit (#86)

* patch: setup prettier

* patch: move .commitlintrc.js to .config

* patch: config lint-staged and update husky

* patch: configure eslint as well
This commit is contained in:
Nick Fields
2022-08-02 22:47:32 -04:00
committed by GitHub
parent 14b6b46d04
commit 3dad7de805
15 changed files with 2702 additions and 418 deletions

18
dist/index.js vendored
View File

@@ -712,25 +712,25 @@ function getExecutable() {
}
var executable;
switch (SHELL) {
case "bash":
case "python":
case "pwsh": {
case 'bash':
case 'python':
case 'pwsh': {
executable = SHELL;
break;
}
case "sh": {
case 'sh': {
if (OS === 'win32') {
throw new Error("Shell ".concat(SHELL, " not allowed on OS ").concat(OS));
}
executable = SHELL;
break;
}
case "cmd":
case "powershell": {
case 'cmd':
case 'powershell': {
if (OS !== 'win32') {
throw new Error("Shell ".concat(SHELL, " not allowed on OS ").concat(OS));
}
executable = SHELL + ".exe";
executable = SHELL + '.exe';
break;
}
default: {
@@ -778,8 +778,8 @@ function runCmd(attempt) {
done = false;
(0, core_1.debug)("Running command ".concat(COMMAND, " on ").concat(OS, " using shell ").concat(executable));
child = attempt > 1 && NEW_COMMAND_ON_RETRY
? (0, child_process_1.exec)(NEW_COMMAND_ON_RETRY, { 'shell': executable })
: (0, child_process_1.exec)(COMMAND, { 'shell': executable });
? (0, child_process_1.exec)(NEW_COMMAND_ON_RETRY, { shell: executable })
: (0, child_process_1.exec)(COMMAND, { shell: executable });
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', function (data) {
process.stdout.write(data);
});