Jam3/adviser

View on GitHub
src/core/config/schema-validator.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function _formatSchemaErrors has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _formatSchemaErrors(errors) {
    const filteredRules = [];

    return errors
      .map(error => {
Severity: Minor
Found in src/core/config/schema-validator.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

            return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
    Severity: Major
    Found in src/core/config/schema-validator.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                return `"${field}" ${error.message} [${error.params.allowedValues}]`;
      Severity: Major
      Found in src/core/config/schema-validator.js - About 30 mins to fix

        Parsing error: The keyword 'const' is reserved
        Open

        const debug = require('debug')('adviser:schema-validator');
        Severity: Minor
        Found in src/core/config/schema-validator.js by eslint

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

        There are no issues that match your filters.

        Category
        Status