-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,12 +34,12 @@ export function addFile( | |
await fsExtra.createFile(absoluteFilePath) | ||
|
||
if (content) { | ||
const writeContent = | ||
typeof content === 'string' | ||
? util.promisify(fs.writeFile) | ||
: fsExtra.writeJSON | ||
|
||
await writeContent(absoluteFilePath, content) | ||
if (typeof content === 'string') { | ||
const normalizedContent = content.trim() | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kettanaito
Author
Owner
|
||
await fs.promises.writeFile(absoluteFilePath, normalizedContent) | ||
} else { | ||
await fsExtra.writeJSON(absoluteFilePath, content) | ||
} | ||
} | ||
|
||
return absoluteFilePath | ||
|
👋 hi @kettanaito curious what triggered this change?
Removing the white space was actually a breaking change for eslint/eslintrc#44 (comment) because it broke the indentation in a yaml file that was already partly indented.