Skip to content

Commit 1b6c8df

Browse files
authored
refactor(cli): turn off warning/error for process exit (#1505)
see #1430
1 parent 702793a commit 1b6c8df

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default defineConfig([
8585
"n/no-extraneous-import": "off", // https://github.com/eclipse-thingweb/node-wot/issues/1430
8686
"n/no-deprecated-api": "off", // https://github.com/eclipse-thingweb/node-wot/issues/1430
8787
"n/no-unpublished-import": "error",
88-
"n/no-process-exit": "off", // https://github.com/eclipse-thingweb/node-wot/issues/1430
88+
"n/no-process-exit": "error",
8989
"n/hashbang": "warn",
9090

9191
// *************** Ensure that only used dependencies are imported ***************

packages/cli/src/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ program.action(async function (_, options, cmd) {
137137
} catch (err) {
138138
if ((err as NodeJS.ErrnoException)?.code !== "ENOENT" || options.configFile != null) {
139139
error("node-wot configuration file error:\n%O\nClose.", err);
140+
// eslint-disable-next-line n/no-process-exit
140141
process.exit((err as NodeJS.ErrnoException).errno ?? 1);
141142
}
142143

packages/cli/src/executor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class Executor {
4545
} catch (error) {
4646
// eslint-disable-next-line no-console
4747
console.error("Error running WoT script:", error);
48+
// eslint-disable-next-line n/no-process-exit
4849
process.exit(1);
4950
}
5051
}

0 commit comments

Comments
 (0)