jdalrymple/html-to-latex

View on GitHub

Showing 5 of 5 total issues

File convert.js has 355 lines of code (exceeds 250 allowed). Consider refactoring.
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';
Severity: Minor
Found in test/unit/convert.js - About 4 hrs to fix

    File convert.js has 275 lines of code (exceeds 250 allowed). Consider refactoring.
    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';
    Severity: Minor
    Found in src/convert.js - About 2 hrs to fix

      Function setup has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      setup: (args) => {
      args
      .positional('[--ifp] <input-file>', {
      type: 'string',
      })
      Severity: Major
      Found in src/bin.js - About 2 hrs to fix

        Function convertImage has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

        async function convertImage(
        node,
        {
        compilationDir,
        autoGenImageNames = true,
        Severity: Minor
        Found in src/convert.js - About 45 mins to fix

        Function image has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        export function image(path, { width, height, keepRatio, center } = { center: true }) {
        const line = ['\\includegraphics'];
        const options = [];
         
        if (width) options.push(`width=${width}`);
        Severity: Minor
        Found in src/templates.js - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language