Showing 5 of 5 total issues
File convert.js
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { directory } from 'tempy';import { pathExists, remove, readFile } from 'fs-extra';import { resolve } from 'path';import ShortId from 'shortid';import { convertText, exportFile, convertFile } from '../../src/convert';
File convert.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { parseFragment } from 'parse5';import { decodeHTML } from 'entities';import { outputFile, readFile, pathExists, ensureDir } from 'fs-extra';import { resolve, basename, join, dirname, extname } from 'path';import { stream } from 'got';
Function setup
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setup: (args) => { args .positional('[--ifp] <input-file>', { type: 'string', })
Function convertImage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
async function convertImage( node, { compilationDir, autoGenImageNames = true,
- Read upRead up
Function image
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
export function image(path, { width, height, keepRatio, center } = { center: true }) { const line = ['\\includegraphics']; const options = []; if (width) options.push(`width=${width}`);
- Read upRead up