Skip to content

Commit

Permalink
chore: run linter and formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jun 11, 2024
1 parent 87278d4 commit 271aa46
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/myst-cli/src/cli/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ function parseInt(value: any) {
return parsedValue;
}


export function makePdfOption(description: string) {
return new Option('--pdf', description).default(false);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/myst-cli/src/cli/upgrade.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Command } from 'commander';

export function makeUpgradeCommand() {
const command = new Command('upgrade')
.description('Upgrade Jupyter Book projects to MyST')
return command;
const command = new Command('upgrade').description('Upgrade Jupyter Book projects to MyST');
return command;
}
1 change: 1 addition & 0 deletions packages/myst-cli/src/upgrade/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export function validateJupyterBookConfig(config: unknown): JupyterBookConfig |
}

function parseGitHubRepoURL(url: string): string | undefined {
//eslint-disable-next-line
const match = url.match(/(?:git@|https:\/\/)github.com[:\/](.*)(?:.git)?/);
if (!match) {
return undefined;
Expand Down
4 changes: 2 additions & 2 deletions packages/myst-cli/src/upgrade/syntax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function upgradeGlossary(path: string) {
const [firstTerm, ...restTerms] = termLines;

// Initial definition
const [firstTermValue, ..._] = firstTerm.content.split(/\s+:\s+/);
const firstTermValue = firstTerm.content.split(/\s+:\s+/, 1)[0];
newLines.push(firstTermValue, `: ${definitionBody}\n`);

if (restTerms) {
Expand All @@ -106,7 +106,7 @@ function upgradeGlossary(path: string) {
const parsedTerm = mystParse(firstTermValue);
const termName = toText(parsedTerm);
for (const { content } of restTerms) {
const [term, ..._] = content.split(/\s+:\s+/);
const term = content.split(/\s+:\s+/, 1)[0];
newLines.push(term, `: {term}\`${termName}\`\n`);
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/myst-cli/src/upgrade/toc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { z } from 'zod';
import { resolveExtension } from '../utils/resolveExtension.js';
import { defined } from './utils.js';
import { join, relative } from 'node:path';
import { cwd } from 'node:process';
import type { Entry as MySTEntry } from 'myst-toc';
Expand Down
1 change: 0 additions & 1 deletion packages/myst-cli/src/upgrade/upgrade.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import path from 'node:path';
import fs from 'node:fs';
import type { ISession } from '../session/types.js';
import { writeJsonLogs } from '../utils/logging.js';
Expand Down

0 comments on commit 271aa46

Please sign in to comment.