UNPKG

yoastseo

Version:

Yoast client-side content analysis

87 lines (86 loc) 5.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _scores = require("./scores"); var _generalFeedbackStrings = require("./feedbackStrings/generalFeedbackStrings"); var _includesConsecutiveWords = require("../helpers/includesConsecutiveWords"); var _isPrecededByException = require("../helpers/isPrecededByException"); var _createRuleDescriptions = require("../helpers/createRuleDescriptions"); const otherAssessments = [{ identifier: "minorities", nonInclusivePhrases: ["minorities"], inclusiveAlternatives: ["<i>members of the LGBTQ+ community</i>", "<i>Indigenous peoples</i>", "<i>marginalized groups</i>", "<i>religious minorities</i>"], score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE, feedbackFormat: [_generalFeedbackStrings.beCarefulHarmful, "Consider using an alternative" + " by being specific about which group(s) of people you are referring to. For example: %2$s, %3$s, %4$s. " + "In case an alternative is not available, make sure to specify the type of minorities you are referring to, e.g., %5$s."].join(" ") }, { identifier: "normalPerson", nonInclusivePhrases: ["normal person"], inclusiveAlternatives: ["<i>typical person, average person</i> or describing the person's specific trait, " + "experience, or behavior"], score: _scores.SCORES.NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.redHarmful, rule: (words, nonInclusivePhrase) => { return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isNotPrecededByException)(words, ["mentally", "behaviorally", "behaviourally"])); }, ruleDescription: (0, _createRuleDescriptions.notPreceded)(["mentally", "behaviorally", "behaviourally"]) }, { identifier: "normalPeople", nonInclusivePhrases: ["normal people", "Normal people"], inclusiveAlternatives: ["<i>typical people, average people</i> or describing people's specific trait, " + "experience, or behavior"], score: _scores.SCORES.NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.redHarmful, caseSensitive: true, rule: (words, nonInclusivePhrase) => { return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isNotPrecededByException)(words, ["mentally", "behaviorally", "behaviourally"])); }, ruleDescription: (0, _createRuleDescriptions.notPreceded)(["mentally", "behaviorally", "behaviourally"]) }, { identifier: "mentallyNormal", nonInclusivePhrases: ["mentally normal"], inclusiveAlternatives: ["<i>people without mental health conditions</i>, <i>mentally healthy people</i>"], score: _scores.SCORES.NON_INCLUSIVE, feedbackFormat: [_generalFeedbackStrings.avoidHarmful, "Consider using an alternative, such as %2$s. If possible, be more specific." + " For example: <i>people who don’t have anxiety disorders</i>, <i>people who haven't experienced trauma</i>, etc." + " Be careful when using mental health descriptors and try to avoid making assumptions about someone's mental health."].join(" ") }, { identifier: "behaviorallyNormal", nonInclusivePhrases: ["behaviorally normal", "behaviourally normal"], inclusiveAlternatives: ["<i>showing typical behavior</i> or describing the specific behavior"], score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.orangeUnlessAnimalsObjects }, { identifier: "abnormalPerson", nonInclusivePhrases: ["abnormal person"], inclusiveAlternatives: ["describing the person's specific trait, experience, or behavior"], score: _scores.SCORES.NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.redHarmful }, { identifier: "abnormalPeople", nonInclusivePhrases: ["abnormal people"], inclusiveAlternatives: ["describing people's specific trait, experience, or behavior"], score: _scores.SCORES.NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.redHarmful }, { identifier: "mentallyAbnormal", nonInclusivePhrases: ["mentally abnormal"], inclusiveAlternatives: ["<i>people with a mental health condition</i>, <i>people with mental health problems</i>"], score: _scores.SCORES.NON_INCLUSIVE, feedbackFormat: [_generalFeedbackStrings.avoidHarmful, "Consider using an alternative, such as %2$s. If possible, be more specific." + " For example: <i>people who have anxiety disorders, people who have experienced trauma</i>, etc." + " Be careful when using mental health descriptors and try to avoid making assumptions about someone's mental health."].join(" ") }, { identifier: "behaviorallyAbnormal", nonInclusivePhrases: ["behaviorally abnormal", "behaviourally abnormal"], inclusiveAlternatives: ["<i>showing atypical behavior, showing dysfunctional behavior</i> " + "or describing the specific behavior"], score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.orangeUnlessAnimalsObjects }, { identifier: "abnormalBehavior", nonInclusivePhrases: ["abnormal behavior", "abnormal behaviour"], inclusiveAlternatives: ["<i>atypical behavior, unusual behavior</i> " + "or describing the specific behavior"], score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE, feedbackFormat: _generalFeedbackStrings.orangeUnlessAnimalsObjects }]; otherAssessments.forEach(assessment => { assessment.category = "other"; assessment.learnMoreUrl = "https://yoa.st/inclusive-language-other"; }); var _default = exports.default = otherAssessments; //# sourceMappingURL=otherAssessments.js.map