Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Commit 16e9ccf

Browse files
fix: ensure output file path (#299)
1 parent f9b4628 commit 16e9ccf

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

package-lock.json

+2-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"webpack": "^4.0.0"
3939
},
4040
"dependencies": {
41+
"fs-extra": "^8.1.0",
4142
"loader-fs-cache": "^1.0.2",
4243
"loader-utils": "^1.2.3",
4344
"object-hash": "^1.3.1",
@@ -62,7 +63,6 @@
6263
"eslint-config-prettier": "^6.3.0",
6364
"eslint-friendly-formatter": "^4.0.1",
6465
"eslint-plugin-import": "^2.18.2",
65-
"fs-extra": "^8.1.0",
6666
"husky": "^3.0.5",
6767
"jest": "^24.9.0",
6868
"jest-junit": "^8.0.0",

src/Linter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import process from 'process';
22
import { isAbsolute, join } from 'path';
3-
import { writeFileSync } from 'fs';
43

4+
import { writeFileSync, ensureFileSync } from 'fs-extra';
55
import { interpolateName } from 'loader-utils';
66

77
import ESLintError from './ESLintError';
@@ -149,6 +149,7 @@ export default class Linter {
149149
);
150150
}
151151

152+
ensureFileSync(filePath);
152153
writeFileSync(filePath, content);
153154
}
154155

0 commit comments

Comments
 (0)