UNPKG

yoastseo-dep

Version:

Yoast clientside page analysis

69 lines (60 loc) 2.41 kB
import { inherits } from "util"; import { Assessor, ContentAssessor, assessments, helpers } from "yoastseo-dep"; const { createAnchorOpeningTag } = helpers; const { ParagraphTooLongAssessment, SentenceLengthInTextAssessment, SubheadingDistributionTooLongAssessment, TransitionWordsAssessment, PassiveVoiceAssessment, TextPresenceAssessment, SentenceBeginningsAssessment, } = assessments.readability; /* Temporarily disabled: var sentenceLengthInDescription = require( "./assessments/sentenceLengthInDescriptionAssessment.js" ); */ /** * Creates the Assessor for e-commerce posts and pages content types. * * @param {object} researcher The researcher to use for the analysis. * @param {Object} options The options for this assessor. * * @constructor */ const StorePostsAndPagesContentAssessor = function( researcher, options = {} ) { Assessor.call( this, researcher, options ); this.type = "storePostsAndPagesContentAssessor"; this._assessments = [ new SubheadingDistributionTooLongAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify68" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify69" ), } ), new ParagraphTooLongAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify66" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify67" ), } ), new SentenceLengthInTextAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify48" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify49" ), } ), new TransitionWordsAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify44" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify45" ), } ), new PassiveVoiceAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify42" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify43" ), } ), new TextPresenceAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify56" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify57" ), } ), new SentenceBeginningsAssessment( { urlTitle: createAnchorOpeningTag( "https://yoa.st/shopify5" ), urlCallToAction: createAnchorOpeningTag( "https://yoa.st/shopify65" ), } ), ]; }; inherits( StorePostsAndPagesContentAssessor, ContentAssessor ); export default StorePostsAndPagesContentAssessor;