Skip to content

Commit d0e1ff0

Browse files
author
tal-rofe
committed
fix: 🐞 set empty package.json in .exlint home folder
set empty package.json in .exlint home folder
1 parent a24e92a commit d0e1ff0

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

bin/exlint.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
#!/usr/bin/env node
22

3-
const path = require('node:path');
4-
const os = require('node:os');
5-
6-
const fs = require('fs-extra');
7-
83
// To use V8's code cache to speed up instantiation time
94
require('v8-compile-cache');
105

11-
const EXLINT_FOLDER_PATH = path.join(os.homedir(), '.exlint');
12-
13-
fs.ensureDir(EXLINT_FOLDER_PATH);
14-
156
function onFatalError() {
167
process.exitCode = 1;
178
}

src/main.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
import path from 'node:path';
2+
3+
import fs from 'fs-extra';
14
import { Logger } from '@nestjs/common';
25
import { CommandFactory } from 'nest-commander';
36

47
import { AppModule } from './app.module';
8+
import { EXLINT_FOLDER_PATH } from './models/exlint-folder';
9+
10+
const packageJsonPath = path.join(EXLINT_FOLDER_PATH, 'package.json');
11+
12+
await fs.outputJson(packageJsonPath, {});
513

614
await CommandFactory.run(AppModule, {
715
logger: process.env.NODE_ENV === 'development' ? new Logger() : false,

0 commit comments

Comments
 (0)