chore(deps): upgrade eslint, prettier & related packages
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
0a53a1d7f0
commit
6c91f81b0e
@@ -24,8 +24,10 @@ if (
|
||||
start < 1 ||
|
||||
start !== end - 1
|
||||
) {
|
||||
throw 'Step not created. Steps specified must be' +
|
||||
' consecutive numbers and start step must be greater than 0.';
|
||||
throw (
|
||||
'Step not created. Steps specified must be' +
|
||||
' consecutive numbers and start step must be greater than 0.'
|
||||
);
|
||||
}
|
||||
|
||||
const existingSteps = getExistingStepNums(projectPath);
|
||||
|
@@ -73,14 +73,8 @@ const reorderSteps = () => {
|
||||
const projectPath = getProjectPath();
|
||||
|
||||
const projectName = process.env.CALLING_DIR
|
||||
? process.env.CALLING_DIR.split(path.sep)
|
||||
.slice(-1)
|
||||
.toString()
|
||||
: process
|
||||
.cwd()
|
||||
.split(path.sep)
|
||||
.slice(-1)
|
||||
.toString();
|
||||
? process.env.CALLING_DIR.split(path.sep).slice(-1).toString()
|
||||
: process.cwd().split(path.sep).slice(-1).toString();
|
||||
|
||||
const curriculumPath = process.env.CALLING_DIR
|
||||
? ''
|
||||
@@ -187,8 +181,10 @@ const getExistingStepNums = projectPath => {
|
||||
) {
|
||||
let stepNum = fileName.split('.')[0].split('-')[1];
|
||||
if (!/^\d{3}$/.test(stepNum)) {
|
||||
throw `Step not created. File ${fileName} has a step number containing non-digits.` +
|
||||
' Please run reorder-steps script first.';
|
||||
throw (
|
||||
`Step not created. File ${fileName} has a step number containing non-digits.` +
|
||||
' Please run reorder-steps script first.'
|
||||
);
|
||||
}
|
||||
stepNum = parseInt(stepNum, 10);
|
||||
stepNums.push(stepNum);
|
||||
|
@@ -51,7 +51,7 @@ exports.parseMD = function parseMD(filename) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const file = readSync(filename);
|
||||
const tree = processor.parse(file);
|
||||
processor.run(tree, file, function(err, node, file) {
|
||||
processor.run(tree, file, function (err, node, file) {
|
||||
if (!err) {
|
||||
delete file.contents;
|
||||
resolve(file.data);
|
||||
|
@@ -90,14 +90,16 @@ function validateEditableMarkers({ value, position }) {
|
||||
lines.forEach((line, index) => {
|
||||
if (line.match(twoMarkersRE)) {
|
||||
throw Error(
|
||||
`Line ${baseLineNumber +
|
||||
index} has two markers. Each line should only have one.`
|
||||
`Line ${
|
||||
baseLineNumber + index
|
||||
} has two markers. Each line should only have one.`
|
||||
);
|
||||
}
|
||||
if (line.match(formattedMarkerRE)) {
|
||||
throw Error(
|
||||
`Line ${baseLineNumber +
|
||||
index} has a malformed marker. It should be --fcc-editable-region--`
|
||||
`Line ${
|
||||
baseLineNumber + index
|
||||
} has a malformed marker. It should be --fcc-editable-region--`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@@ -11,9 +11,7 @@ const { editableRegionMarker } = require('./add-seed');
|
||||
const tableAndStrikeThrough = require('./table-and-strikethrough');
|
||||
|
||||
async function parse(file) {
|
||||
return await remark()
|
||||
.use(tableAndStrikeThrough)
|
||||
.parse(file);
|
||||
return await remark().use(tableAndStrikeThrough).parse(file);
|
||||
}
|
||||
|
||||
function plugin() {
|
||||
|
Reference in New Issue
Block a user