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

Commit

Permalink
fix: ensure output file path (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Sep 26, 2019
1 parent f9b4628 commit 16e9ccf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
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
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
@@ -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

0 comments on commit 16e9ccf

Please sign in to comment.