medialize/ally.js

View on GitHub
build/metalsmith/plugins/absolute-url.js

Summary

Maintainability
A
1 hr
Test Coverage

Function transform has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function transform($, file, fileName, options) {
  const absolute = path.join(options.resolve, fileName);
  if (options.canonical) {
    const canonical = options.canonical + fileName;
    const $canonical = $('<link rel="canonical" href="">').attr('href', canonical);
Severity: Minor
Found in build/metalsmith/plugins/absolute-url.js - About 1 hr to fix

    'new Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead.
    Open

          files[key].contents = new Buffer(page.html());

    For more information visit Source: http://eslint.org/docs/rules/

    There are no issues that match your filters.

    Category
    Status