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

fix: ensure output file path #299

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"webpack": "^4.0.0"
},
"dependencies": {
"fs-extra": "^8.1.0",
"loader-fs-cache": "^1.0.2",
"loader-utils": "^1.2.3",
"object-hash": "^1.3.1",
Expand All @@ -62,7 +63,6 @@
"eslint-config-prettier": "^6.3.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.18.2",
"fs-extra": "^8.1.0",
"husky": "^3.0.5",
"jest": "^24.9.0",
"jest-junit": "^8.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Linter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import process from 'process';
import { isAbsolute, join } from 'path';
import { writeFileSync } from 'fs';

import { writeFileSync, ensureFileSync } from 'fs-extra';
import { interpolateName } from 'loader-utils';

import ESLintError from './ESLintError';
Expand Down Expand Up @@ -149,6 +149,7 @@ export default class Linter {
);
}

ensureFileSync(filePath);
writeFileSync(filePath, content);
}

Expand Down