Skip to content

Commit

Permalink
fix lint in the course property integration
Browse files Browse the repository at this point in the history
  • Loading branch information
wildcard committed Nov 17, 2022
1 parent e3adb91 commit efa7ef2
Show file tree
Hide file tree
Showing 5 changed files with 454 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2021
},
"rules": {
}
Expand Down
7 changes: 4 additions & 3 deletions generate-github-skills-readme-from-lab-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ function extractYTVidfromUrl(videoUrl) {

function stepTemplate(index, stepsCount, title, description, video, link, {
mdFileContent,
courseStep,
noLink
}) {
const stepTitle = `${(index + 1).toString().padStart(2, '0')} - ${title}`;
const ytVideoId = extractYTVidfromUrl(video);

return `
<details id=${index === stepsCount - 1 ? 'X' : index} ${index === 0 ? 'open' : ''}>
<summary><h2>${stepTitle}</h2></summary>
<summary><h2>${courseStep ? 'COURSE: ' : ''}${stepTitle}</h2></summary>
${description}
Expand All @@ -60,7 +61,7 @@ function isPathtoRelativeMdFile(path) {
}

async function fetchCourseDetails(course, {octokit, reporter}) {
const [owner, repo] = course.split('/');
let [owner, repo] = course.split('/');
owner ||= process.env.GITHUB_REPOSITORY_OWNER;

try {
Expand Down Expand Up @@ -134,7 +135,7 @@ async function generateReadmeFromConfig(

// TODO: YouTube thumbnail fetcher

return {...step, index, mdFileContent, noLink: (inlineMDlinks || inlineMDlink)}
return {...step, index, mdFileContent, courseStep, noLink: (inlineMDlinks || inlineMDlink)}
}))
labConfigSteps.sort((a, b) => a.index - b.index);

Expand Down
Loading

0 comments on commit efa7ef2

Please sign in to comment.