amercier/esviz

View on GitHub

Showing 19 of 19 total issues

Function parseDirectory has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function parseDirectory(root) {
return new Promise((resolve, reject) => {
const rootId = getNodeId('.');
const nodes = {
[rootId]: { id: rootId, name: rootId, type: 'root' },
Severity: Minor
Found in src/lib/ast.js - About 1 hr to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export function buildItemsFromDirectory(path) {
    const node = buildNodeFromDirectory(path);
    const link = buildLinkToParentNode(node.id, 'subdir');
    return { node, link };
    }
    Severity: Major
    Found in src/lib/ast.js and 1 other location - About 1 hr to fix
    src/lib/ast.js on lines 126..130

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export function buildItemsFromFile(path) {
    const node = buildNodeFromFile(path);
    const link = buildLinkToParentNode(node.id, 'child');
    return { node, link };
    }
    Severity: Major
    Found in src/lib/ast.js and 1 other location - About 1 hr to fix
    src/lib/ast.js on lines 115..119

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    it('adds root -> dir subdir links', () => {
    expect(result.links).to.deep.contain({ source: '/', target: 'lib', type: 'subdir' });
    });
    Severity: Major
    Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
    specs/lib/ast.spec.js on lines 45..47
    specs/lib/ast.spec.js on lines 91..93
    specs/lib/ast.spec.js on lines 109..111

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    it('adds a root node', () => {
    expect(result.nodes).to.deep.contain({ id: '/', name: '/', type: 'root' });
    });
    Severity: Major
    Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
    specs/lib/ast.spec.js on lines 77..79
    specs/lib/ast.spec.js on lines 91..93
    specs/lib/ast.spec.js on lines 109..111

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    it('adds root -> module child links', () => {
    expect(result.links).to.deep.contain({ source: '/', target: 'lib', type: 'subdir' });
    });
    Severity: Major
    Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
    specs/lib/ast.spec.js on lines 45..47
    specs/lib/ast.spec.js on lines 77..79
    specs/lib/ast.spec.js on lines 109..111

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    it('adds external modules', () => {
    expect(result.nodes).to.deep.contain({ id: '/chalk', name: 'chalk', type: 'external' });
    });
    Severity: Major
    Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
    specs/lib/ast.spec.js on lines 45..47
    specs/lib/ast.spec.js on lines 77..79
    specs/lib/ast.spec.js on lines 91..93

    Expected parentheses around arrow function argument having a body with curly braces.
    Open

    .then(ast => {
    Severity: Minor
    Found in src/lib/ast.js by eslint

    Expected parentheses around arrow function argument having a body with curly braces.
    Open

    ast.parseDirectory(fixturePath).then(graph => {
    Severity: Minor
    Found in specs/lib/ast.spec.js by eslint

    Expected parentheses around arrow function argument having a body with curly braces.
    Open

    subGraph.nodes.forEach(node => {
    Severity: Minor
    Found in src/lib/ast.js by eslint

    Expected parentheses around arrow function argument having a body with curly braces.
    Open

    modulePaths.some(modulePath => {
    Severity: Minor
    Found in src/lib/ast.js by eslint

    Expected 'this' to be used by class method 'sayHistory'.
    Open

    sayHistory() {

    Expected parentheses around arrow function argument having a body with curly braces.
    Open

    .each(subGraph => {
    Severity: Minor
    Found in src/lib/ast.js by eslint

    Prefer default export.
    Open

    export function log(...args) {
    Severity: Minor
    Found in specs/fixture/lib/util/console.js by eslint

    Expected 'this' to be used by class method 'getPolyName'.
    Open

    getPolyName() {
    Severity: Minor
    Found in specs/fixture/lib.js by eslint

    Missing trailing comma.
    Open

    })
    Severity: Minor
    Found in specs/lib/ast.spec.js by eslint

    Missing trailing comma.
    Open

    })
    Severity: Minor
    Found in src/lib/ast.js by eslint

    Prefer default export.
    Open

    export const ast = astLib;
    Severity: Minor
    Found in src/lib/index.js by eslint

    Expected parentheses around arrow function argument having a body with curly braces.
    Open

    .then(output => {
    Severity: Minor
    Found in src/lib/cli.js by eslint
    Severity
    Category
    Status
    Source
    Language