[7.x] [mkdirp] remove in favor of recursive fs.mkdir (#47251) (#47333)

* [mkdirp] remove in favor of recursive fs.mkdir

* add eslint rule to educate future contributors

* reword the eslint error message to prevent copy-pasting callback code

* Commit updated kbn-pm dist

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Fix typo

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

# Conflicts:
#	renovate.json5
This commit is contained in:
Spencer 2019-10-04 09:35:21 -07:00 committed by GitHub
parent 146689829b
commit bbacb1c365
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 177 additions and 220 deletions

View file

@ -25,7 +25,6 @@ import Handlebars from 'handlebars';
import fs from 'fs';
import path from 'path';
import imageDiff from 'image-diff';
import mkdirp from 'mkdirp';
import moment from 'moment';
import SimpleGit from 'simple-git';
@ -77,8 +76,8 @@ async function compareScreenshots() {
const SESSION_SCREENSHOTS_DIR = path.resolve(SCREENSHOTS_DIR, 'session');
// We don't need to create the baseline dir because it's committed.
mkdirp.sync(DIFF_SCREENSHOTS_DIR);
mkdirp.sync(SESSION_SCREENSHOTS_DIR);
fs.mkdirSync(DIFF_SCREENSHOTS_DIR, { recursive: true });
fs.mkdirSync(SESSION_SCREENSHOTS_DIR, { recursive: true });
const files = await readDirAsync(SESSION_SCREENSHOTS_DIR);
const screenshots = files.filter(file => file.indexOf('.png') !== -1);