diff --git a/eslint.config.mjs b/eslint.config.mjs index 0804da66ad8..e1e0c1b50c5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -24,6 +24,9 @@ export default [ exports: "always-multiline", }, ], + + // Deviate from the Yoast config to allow for not using the error that is caught. + "no-unused-vars": [ "error", { caughtErrors: "none" } ], }, }, { diff --git a/package.json b/package.json index 010b049ae1c..3bb7855598a 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "core-js": "^2.6.12", "cross-env": "^7.0.3", "dotenv": "^8.2.0", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.13.0", "grunt-git": "^1.0.14", diff --git a/packages/analysis-report/package.json b/packages/analysis-report/package.json index e64d3ae2e96..b87ce30cd3b 100644 --- a/packages/analysis-report/package.json +++ b/packages/analysis-report/package.json @@ -36,7 +36,7 @@ "@yoast/babel-preset": "^1.1.1", "@yoast/jest-preset": "^1.0.1", "babel-plugin-styled-components": "^2.0.6", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.13.0", "jest": "^27.5.1", diff --git a/packages/analysis-report/src/AnalysisResult.js b/packages/analysis-report/src/AnalysisResult.js index 63af6fdf71b..567889aeba9 100644 --- a/packages/analysis-report/src/AnalysisResult.js +++ b/packages/analysis-report/src/AnalysisResult.js @@ -1,4 +1,3 @@ -/* eslint-disable complexity */ import React, { useCallback, useEffect, useState } from "react"; import PropTypes from "prop-types"; import styled from "styled-components"; diff --git a/packages/eslint/package.json b/packages/eslint/package.json index b7cdd0063c6..7d3b7f30f0f 100644 --- a/packages/eslint/package.json +++ b/packages/eslint/package.json @@ -39,6 +39,6 @@ "eslint": "^8.57 || >= 9" }, "devDependencies": { - "eslint": "^9.15.0" + "eslint": "^9.16.0" } } diff --git a/packages/helpers/package.json b/packages/helpers/package.json index a6d45b4d5c9..157918f55da 100644 --- a/packages/helpers/package.json +++ b/packages/helpers/package.json @@ -40,7 +40,7 @@ "@babel/preset-env": "^7.16.11", "@yoast/browserslist-config": "^1.2.3", "babel-plugin-styled-components": "^2.0.6", - "eslint": "^9.15.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.12.0", "jest-styled-components": "^7.0.3", diff --git a/packages/js/eslint.config.mjs b/packages/js/eslint.config.mjs index 1382935c549..947caf6da42 100644 --- a/packages/js/eslint.config.mjs +++ b/packages/js/eslint.config.mjs @@ -60,6 +60,10 @@ export default [ exports: "always-multiline", }, ], + + // Deviate from the Yoast config to allow for not using the error that is caught. + "no-unused-vars": [ "error", { caughtErrors: "none" } ], + // Deviate from the Yoast config to allow longer template literals. "stylistic/max-len": [ "error", diff --git a/packages/js/package.json b/packages/js/package.json index 0f3a144dfb7..85394b9afd1 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "cd ../.. && wp-scripts build --config config/webpack/webpack.config.js", "test": "jest", - "lint": "eslint . --max-warnings=51" + "lint": "eslint . --max-warnings=64" }, "dependencies": { "@draft-js-plugins/mention": "^5.0.0", @@ -83,7 +83,7 @@ "@yoast/jest-preset": "^1.0.0", "babel-plugin-styled-components": "^2.0.6", "case-sensitive-paths-webpack-plugin": "^2.1.2", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.13.0", "jest": "^27.5.1", diff --git a/packages/js/src/academy/app.js b/packages/js/src/academy/app.js index 8e188d3564f..d7a04492f1b 100644 --- a/packages/js/src/academy/app.js +++ b/packages/js/src/academy/app.js @@ -1,4 +1,4 @@ -/* eslint-disable complexity */ + import { ExternalLinkIcon, LockOpenIcon } from "@heroicons/react/outline"; import { ArrowSmRightIcon } from "@heroicons/react/solid"; import { useMemo } from "@wordpress/element"; diff --git a/packages/js/src/ai-assessment-fixes/components/modal-content.js b/packages/js/src/ai-assessment-fixes/components/modal-content.js index 3d8cc872936..284ae510013 100644 --- a/packages/js/src/ai-assessment-fixes/components/modal-content.js +++ b/packages/js/src/ai-assessment-fixes/components/modal-content.js @@ -1,4 +1,4 @@ -/* eslint-disable complexity */ + import { useDispatch, useSelect } from "@wordpress/data"; import { useMemo } from "@wordpress/element"; import { AiFixAssessmentsUpsell } from "../../shared-admin/components"; diff --git a/packages/js/src/block-editor.js b/packages/js/src/block-editor.js index 90426be4f27..8df0d322796 100644 --- a/packages/js/src/block-editor.js +++ b/packages/js/src/block-editor.js @@ -1,8 +1,8 @@ -/* eslint-disable no-unused-vars */ + import initBlockEditorIntegration from "./initializers/block-editor-integration"; import BlockEditorData from "./analysis/blockEditorData"; window.yoast = window.yoast || {}; window.yoast.initEditorIntegration = initBlockEditorIntegration; window.yoast.EditorData = BlockEditorData; -/* eslint-enable no-unused-vars */ + diff --git a/packages/js/src/bulk-editor.js b/packages/js/src/bulk-editor.js index 52b6ec76de4..8484f3212e6 100644 --- a/packages/js/src/bulk-editor.js +++ b/packages/js/src/bulk-editor.js @@ -70,7 +70,7 @@ import jQuery from "jquery"; var data = { action: saveAllMethod, - // eslint-disable-next-line + _ajax_nonce: wpseoBulkEditorNonce, }; @@ -170,7 +170,7 @@ import jQuery from "jquery"; return instance; }; - // eslint-disable-next-line + window.bulk_editor = bulkEditor; window.bulkEditor = bulkEditor; diff --git a/packages/js/src/classic-editor.js b/packages/js/src/classic-editor.js index 43d6fcf5619..ebf1863d4f5 100644 --- a/packages/js/src/classic-editor.js +++ b/packages/js/src/classic-editor.js @@ -1,8 +1,8 @@ -/* eslint-disable no-unused-vars */ + import initClassicEditorIntegration from "./initializers/classic-editor-integration"; import ClassicEditorData from "./analysis/classicEditorData"; window.yoast = window.yoast || {}; window.yoast.initEditorIntegration = initClassicEditorIntegration; window.yoast.EditorData = ClassicEditorData; -/* eslint-enable no-unused-vars */ + diff --git a/packages/js/src/components/PluginIcon.js b/packages/js/src/components/PluginIcon.js index 60f1d85ff49..1a61413f682 100644 --- a/packages/js/src/components/PluginIcon.js +++ b/packages/js/src/components/PluginIcon.js @@ -24,7 +24,6 @@ const PluginIconSVG = styled.svg` * @returns {wp.Element} The component. */ const PluginIcon = function( props ) { - /* eslint-disable max-len */ return ; - /* eslint-enable max-len */ }; PluginIcon.propTypes = { diff --git a/packages/js/src/components/contentAnalysis/InclusiveLanguageAnalysis.js b/packages/js/src/components/contentAnalysis/InclusiveLanguageAnalysis.js index 1b4c43566f8..63b59b59031 100644 --- a/packages/js/src/components/contentAnalysis/InclusiveLanguageAnalysis.js +++ b/packages/js/src/components/contentAnalysis/InclusiveLanguageAnalysis.js @@ -232,7 +232,7 @@ const InclusiveLanguageAnalysis = ( props ) => { InclusiveLanguageAnalysis.propTypes = { results: PropTypes.array, // `marksButtonStatus` is used, but not recognized by ESLint. - // eslint-disable-next-line react/no-unused-prop-types + marksButtonStatus: PropTypes.oneOf( [ "enabled", "disabled", "hidden" ] ).isRequired, overallScore: PropTypes.number, shouldUpsellHighlighting: PropTypes.bool, diff --git a/packages/js/src/components/contentAnalysis/mapResults.js b/packages/js/src/components/contentAnalysis/mapResults.js index a9ef408c0e9..82b2a940dc4 100644 --- a/packages/js/src/components/contentAnalysis/mapResults.js +++ b/packages/js/src/components/contentAnalysis/mapResults.js @@ -94,7 +94,7 @@ function processResult( mappedResult, mappedResults ) { * * @returns {Object} The icon and color for the score. */ -export function getIconForScore( score ) { // eslint-disable-line complexity +export function getIconForScore( score ) { switch ( score ) { case "loading": return { icon: "loading-spinner", color: colors.$color_green_medium_light }; diff --git a/packages/js/src/containers/PluginIcon.js b/packages/js/src/containers/PluginIcon.js index 8117191b32c..ae35f447b0e 100644 --- a/packages/js/src/containers/PluginIcon.js +++ b/packages/js/src/containers/PluginIcon.js @@ -11,7 +11,7 @@ export default compose( [ const readabilityScoreIndicator = getIndicatorForScore( data.getReadabilityResults().overallScore ); const { isKeywordAnalysisActive, isContentAnalysisActive } = data.getPreferences(); - /* eslint-disable-next-line no-unused-vars */ + let readabilityScoreColor; switch ( readabilityScoreIndicator.className ) { case "good": @@ -26,7 +26,7 @@ export default compose( [ break; } - /* eslint-disable-next-line no-unused-vars */ + let seoScoreColor; switch ( seoScoreIndicator.className ) { case "good": diff --git a/packages/js/src/elementor/containers/ElementorFill.js b/packages/js/src/elementor/containers/ElementorFill.js index b4ad80b9605..56230f49831 100644 --- a/packages/js/src/elementor/containers/ElementorFill.js +++ b/packages/js/src/elementor/containers/ElementorFill.js @@ -2,7 +2,7 @@ import { compose } from "@wordpress/compose"; import { withDispatch, withSelect } from "@wordpress/data"; import ElementorFill from "../components/fills/ElementorFill"; -/* eslint-disable complexity */ + export default compose( [ withSelect( select => { const { @@ -23,4 +23,4 @@ export default compose( [ }; } ), ] )( ElementorFill ); -/* eslint-enable complexity */ + diff --git a/packages/js/src/filter-explanation.js b/packages/js/src/filter-explanation.js index 75d468f4959..678da3f5d86 100644 --- a/packages/js/src/filter-explanation.js +++ b/packages/js/src/filter-explanation.js @@ -1,8 +1,8 @@ /* global yoastFilterExplanation */ -/* eslint-disable max-len */ + ( function( $ ) { $( "#posts-filter .tablenav.top" ).after( `

${ yoastFilterExplanation.text }

` ); }( jQuery ) ); -/* eslint-enable max-len */ + diff --git a/packages/js/src/first-time-configuration/first-time-configuration-steps.js b/packages/js/src/first-time-configuration/first-time-configuration-steps.js index 3468f1150e8..d278cd30594 100644 --- a/packages/js/src/first-time-configuration/first-time-configuration-steps.js +++ b/packages/js/src/first-time-configuration/first-time-configuration-steps.js @@ -150,7 +150,6 @@ function calculateInitialState( windowObject, isStepFinished ) { }; } -/* eslint-enable max-len, react/prop-types */ /* eslint-disable max-statements */ /** @@ -401,7 +400,7 @@ export default function FirstTimeConfigurationSteps() { setShowEditButton( stepperFinishedOnce && ! isStepBeingEdited ); }, [ stepperFinishedOnce, isStepBeingEdited ] ); - /* eslint-disable max-len */ + useEffect( () => { /** * Prevents the submission of the form upon pressing enter. @@ -586,7 +585,7 @@ export default function FirstTimeConfigurationSteps() { ); } -/* eslint-enable max-len */ + /* eslint-enable complexity */ /* eslint-enable react/jsx-no-bind */ /* eslint-enable max-statements */ diff --git a/packages/js/src/first-time-configuration/tailwind-components/base/radio-group.js b/packages/js/src/first-time-configuration/tailwind-components/base/radio-group.js index 1a40681278e..488469012c5 100644 --- a/packages/js/src/first-time-configuration/tailwind-components/base/radio-group.js +++ b/packages/js/src/first-time-configuration/tailwind-components/base/radio-group.js @@ -1,4 +1,4 @@ -/* eslint-disable no-undefined */ + import classNames from "classnames"; import PropTypes from "prop-types"; import { useCallback } from "@wordpress/element"; diff --git a/packages/js/src/first-time-configuration/tailwind-components/step-circle.js b/packages/js/src/first-time-configuration/tailwind-components/step-circle.js index ce3db96c403..0f2498f9ccb 100644 --- a/packages/js/src/first-time-configuration/tailwind-components/step-circle.js +++ b/packages/js/src/first-time-configuration/tailwind-components/step-circle.js @@ -3,7 +3,7 @@ import { useState, useEffect } from "@wordpress/element"; import PropTypes from "prop-types"; import { stepperTimingClasses } from "../stepper-helper"; import { useStepperContext } from "./stepper"; -/* eslint-disable complexity */ + const { slideDuration, delayUntilStepFaded } = stepperTimingClasses; const commonCircleClasses = `yst-transition-opacity ${ slideDuration } yst-absolute yst-inset-0 yst-border-2 yst-flex yst-items-center yst-justify-center yst-rounded-full`; diff --git a/packages/js/src/first-time-configuration/tailwind-components/step-header.js b/packages/js/src/first-time-configuration/tailwind-components/step-header.js index 5dc8c4a6e7b..f7574d262b7 100644 --- a/packages/js/src/first-time-configuration/tailwind-components/step-header.js +++ b/packages/js/src/first-time-configuration/tailwind-components/step-header.js @@ -4,7 +4,6 @@ import { useEffect, useState } from "@wordpress/element"; import { stepperTimings } from "../stepper-helper"; import { useStepperContext } from "./stepper"; -/* eslint-disable complexity */ /** * Gets the classnames for the step name. @@ -22,7 +21,7 @@ function getNameClassNames( isFinished, isActiveStep, isLastStep ) { return isFinished ? "yst-text-slate-900" : "yst-text-slate-600"; } -/* eslint-disable complexity */ + /** * The Step header component. * @@ -87,4 +86,4 @@ StepHeader.defaultProps = { children: [], }; -/* eslint-enable complexity */ + diff --git a/packages/js/src/first-time-configuration/tailwind-components/stepper.js b/packages/js/src/first-time-configuration/tailwind-components/stepper.js index 0145cb0f0cb..32ad4bd36b1 100644 --- a/packages/js/src/first-time-configuration/tailwind-components/stepper.js +++ b/packages/js/src/first-time-configuration/tailwind-components/stepper.js @@ -7,7 +7,7 @@ import { stepperTimings, stepperTimingClasses } from "../stepper-helper"; import StepHeader from "./step-header"; import { FadeInAlert } from "../tailwind-components/base/alert"; -/* eslint-disable complexity */ + const { slideDuration, delayBeforeOpening, @@ -274,4 +274,4 @@ Step.Error = StepError; Step.Header = StepHeader; Step.GoButton = GoButton; Step.EditButton = EditButton; -/* eslint-enable complexity */ + diff --git a/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-input-section.js b/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-input-section.js index 19896197bd9..d907343b2fc 100644 --- a/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-input-section.js +++ b/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-input-section.js @@ -5,7 +5,7 @@ import PropTypes from "prop-types"; import SocialFieldArray from "./social-field-array"; import SocialInput from "./social-input"; -/* eslint-disable complexity */ + /** * A wrapper that combines all the SocialInputs. Intended for use in the first time configuration. * @@ -54,7 +54,7 @@ export default function SocialInputSectionContainer( { socialProfiles, errorFiel /> ); } -/* eslint-enable complexity */ + SocialInputSectionContainer.propTypes = { socialProfiles: PropTypes.object.isRequired, diff --git a/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-profiles-step.js b/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-profiles-step.js index 48b8e5ece34..fb446a58fda 100644 --- a/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-profiles-step.js +++ b/packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-profiles-step.js @@ -4,7 +4,7 @@ import PropTypes from "prop-types"; import SocialInputSection from "./social-input-section"; import Alert from "../../base/alert"; -/* eslint-disable max-len, react/prop-types */ + /** * Social profiles step component * diff --git a/packages/js/src/general/app.js b/packages/js/src/general/app.js index c51d18d2a64..9cf2978ad49 100644 --- a/packages/js/src/general/app.js +++ b/packages/js/src/general/app.js @@ -1,4 +1,4 @@ -/* eslint-disable complexity */ + import { Transition } from "@headlessui/react"; import { AdjustmentsIcon, BellIcon, ChartPieIcon } from "@heroicons/react/outline"; diff --git a/packages/js/src/help-scout-beacon.js b/packages/js/src/help-scout-beacon.js index 07d2baca884..1510ead4136 100644 --- a/packages/js/src/help-scout-beacon.js +++ b/packages/js/src/help-scout-beacon.js @@ -175,7 +175,6 @@ function loadHelpScoutConsent( beaconId, sessionData = null ) { return ( - { /* eslint-disable-next-line max-len */ } @@ -235,7 +234,6 @@ function loadHelpScoutConsent( beaconId, sessionData = null ) { // eslint-disable-next-line no-alert if ( window.confirm( askConsentText ) ) { - // eslint-disable-next-line callback-return loadHelpScout( beaconId, sessionData ); // eslint-disable-next-line new-cap window.Beacon( "open" ); diff --git a/packages/js/src/initializers/admin.js b/packages/js/src/initializers/admin.js index 9a55453c54e..fd352a8cfed 100644 --- a/packages/js/src/initializers/admin.js +++ b/packages/js/src/initializers/admin.js @@ -216,10 +216,10 @@ export default function initAdmin( jQuery ) { window.setWPOption = setWPOption; window.wpseoCopyHomeMeta = wpseoCopyHomeMeta; - // eslint-disable-next-line + window.wpseoSetTabHash = wpseoSetTabHash; - // eslint-disable-next-line + jQuery( document ).ready( function() { /** * When the hash changes, get the base url from the action and then add the current hash. diff --git a/packages/js/src/integrations-page/helper.js b/packages/js/src/integrations-page/helper.js index 3c67476226a..97cc0af87f8 100644 --- a/packages/js/src/integrations-page/helper.js +++ b/packages/js/src/integrations-page/helper.js @@ -59,7 +59,7 @@ export const getIsFreeIntegrationOrPremiumAvailable = ( integration ) => { return ( integration.isPremium && isPremiumInstalled ) || ! integration.isPremium; }; -/* eslint-disable complexity */ + /** * Checks the conditions for which a card is active * @@ -80,7 +80,7 @@ export const getIsCardActive = ( integration, activeState ) => { return networkControlEnabled && multisiteAvailable; }; -/* eslint-enable complexity */ + /** * Updates an integration state. diff --git a/packages/js/src/integrations-page/mastodon-integration.js b/packages/js/src/integrations-page/mastodon-integration.js index cb1958a2a84..8af83cd9ade 100644 --- a/packages/js/src/integrations-page/mastodon-integration.js +++ b/packages/js/src/integrations-page/mastodon-integration.js @@ -4,7 +4,7 @@ import { PropTypes } from "prop-types"; import { Fragment } from "@wordpress/element"; import { SimpleIntegration } from "./simple-integration"; -/* eslint-disable complexity */ + /** * Represents the Mastodon integration. * @@ -38,7 +38,7 @@ export const MastodonIntegration = ( { integration, isActive } ) => { ); }; -/* eslint-enable complexity */ + MastodonIntegration.propTypes = { integration: PropTypes.shape( { diff --git a/packages/js/src/integrations-page/plugin-integration.js b/packages/js/src/integrations-page/plugin-integration.js index c3cdcc5936b..1ebf21dfe7f 100644 --- a/packages/js/src/integrations-page/plugin-integration.js +++ b/packages/js/src/integrations-page/plugin-integration.js @@ -4,7 +4,7 @@ import { PropTypes } from "prop-types"; import { Fragment } from "@wordpress/element"; import { SimpleIntegration } from "./simple-integration"; -/* eslint-disable complexity */ + /** * Represents an integration. * @@ -38,7 +38,7 @@ export const PluginIntegration = ( { integration, isActive } ) => { ); }; -/* eslint-enable complexity */ + PluginIntegration.propTypes = { integration: PropTypes.shape( { diff --git a/packages/js/src/settings.js b/packages/js/src/settings.js index 56cb044ab71..70ab1d22fda 100644 --- a/packages/js/src/settings.js +++ b/packages/js/src/settings.js @@ -7,7 +7,7 @@ import initSettingsHeader from "./initializers/settings-header"; initAdmin( jQuery ); -// eslint-disable-next-line complexity + if ( wpseoScriptData ) { if ( typeof wpseoScriptData.dismissedAlerts !== "undefined" ) { initSettingsStore(); diff --git a/packages/js/src/settings/components/form-layout.js b/packages/js/src/settings/components/form-layout.js index e1fa61d59a3..f89d74f246c 100644 --- a/packages/js/src/settings/components/form-layout.js +++ b/packages/js/src/settings/components/form-layout.js @@ -1,4 +1,4 @@ -/* eslint-disable react/jsx-max-depth */ + import { useCallback, useMemo } from "@wordpress/element"; import { __ } from "@wordpress/i18n"; import { Button, useToggleState } from "@yoast/ui-library"; diff --git a/packages/js/src/settings/components/formik-page-select-field.js b/packages/js/src/settings/components/formik-page-select-field.js index a7382dcb8bf..f8c8a75ed7a 100644 --- a/packages/js/src/settings/components/formik-page-select-field.js +++ b/packages/js/src/settings/components/formik-page-select-field.js @@ -50,7 +50,7 @@ const FormikPageSelectField = ( { name, id, ...props } ) => { const debouncedFetchPages = useCallback( debounce( async search => { try { setStatus( ASYNC_ACTION_STATUS.loading ); - // eslint-disable-next-line camelcase + const response = await fetchPages( { search } ); setQueriedPageIds( map( response.payload, "id" ) ); diff --git a/packages/js/src/settings/components/notifications.js b/packages/js/src/settings/components/notifications.js index 02adb10b394..ad69869d1bd 100644 --- a/packages/js/src/settings/components/notifications.js +++ b/packages/js/src/settings/components/notifications.js @@ -1,4 +1,4 @@ -/* eslint-disable complexity */ + import { useEffect, useMemo } from "@wordpress/element"; import { __ } from "@wordpress/i18n"; import { Notifications as NotificationsUi } from "@yoast/ui-library"; diff --git a/packages/js/src/settings/routes/site-features.js b/packages/js/src/settings/routes/site-features.js index 973c1a9ed6a..b5972ce2bb8 100644 --- a/packages/js/src/settings/routes/site-features.js +++ b/packages/js/src/settings/routes/site-features.js @@ -137,7 +137,7 @@ const LearnMoreLink = ( { id, link, ariaLabel, ...props } ) => { const href = useSelectSettings( "selectLink", [ link ], link ); return ( - // eslint-disable-next-line react/jsx-no-target-blank + { const { values } = useFormikContext(); - // eslint-disable-next-line camelcase + const { website_name: websiteName, company_or_person: companyOrPerson, diff --git a/packages/js/src/settings/store/pages.js b/packages/js/src/settings/store/pages.js index 0cc05aca827..5f3be1c5a2c 100644 --- a/packages/js/src/settings/store/pages.js +++ b/packages/js/src/settings/store/pages.js @@ -1,4 +1,4 @@ -/* eslint-disable camelcase, complexity */ +/* eslint-disable complexity */ import { createEntityAdapter, createSelector, createSlice } from "@reduxjs/toolkit"; import apiFetch from "@wordpress/api-fetch"; import { decodeEntities } from "@wordpress/html-entities"; diff --git a/packages/js/src/settings/store/search.js b/packages/js/src/settings/store/search.js index 654510bf67b..39062b2d1c2 100644 --- a/packages/js/src/settings/store/search.js +++ b/packages/js/src/settings/store/search.js @@ -1,4 +1,4 @@ -/* eslint-disable camelcase */ + import { createSelector, createSlice } from "@reduxjs/toolkit"; import { get, reduce, join, filter, isArray } from "lodash"; import { preferencesSelectors } from "./preferences"; diff --git a/packages/js/src/settings/store/users.js b/packages/js/src/settings/store/users.js index ae5f6af0e61..17b5fbdaedb 100644 --- a/packages/js/src/settings/store/users.js +++ b/packages/js/src/settings/store/users.js @@ -1,4 +1,4 @@ -/* eslint-disable camelcase, complexity */ +/* eslint-disable complexity */ import { createEntityAdapter, createSelector, createSlice } from "@reduxjs/toolkit"; import apiFetch from "@wordpress/api-fetch"; import { buildQueryString } from "@wordpress/url"; diff --git a/packages/js/src/shared-admin/components/ai-fix-assessments-upsell.js b/packages/js/src/shared-admin/components/ai-fix-assessments-upsell.js index c97b18035aa..cf3ce5534db 100644 --- a/packages/js/src/shared-admin/components/ai-fix-assessments-upsell.js +++ b/packages/js/src/shared-admin/components/ai-fix-assessments-upsell.js @@ -24,7 +24,7 @@ export const AiFixAssessmentsUpsell = ( { const { onClose, initialFocus } = useModalContext(); const learnMoreLinkStructure = { - // eslint-disable-next-line jsx-a11y/anchor-has-content + a: } - { /* eslint-disable-next-line max-len */ } { workout && } { ! workout && diff --git a/packages/js/tests/blockEditorData.test.js b/packages/js/tests/blockEditorData.test.js index e543a853483..ddd330f1b32 100644 --- a/packages/js/tests/blockEditorData.test.js +++ b/packages/js/tests/blockEditorData.test.js @@ -3,7 +3,7 @@ global.jQuery = {}; import BlockEditorData from "../src/analysis/blockEditorData.js"; -// eslint-disable-next-line require-jsdoc + const refresh = () => { return true; }; @@ -42,7 +42,6 @@ const data = new BlockEditorData( refresh, store ); describe( "setRefresh", () => { it( "sets the refresh function", () => { - // eslint-disable-next-line require-jsdoc const expected = () => { return "refresh"; }; diff --git a/packages/js/tests/helpers/factory.js b/packages/js/tests/helpers/factory.js index d7f83d3619d..e4330b4bc0b 100644 --- a/packages/js/tests/helpers/factory.js +++ b/packages/js/tests/helpers/factory.js @@ -1,7 +1,7 @@ // Make sure the Jed object is globally available const Jed = require( "jed" ); -// eslint-disable-next-line require-jsdoc + const FactoryProto = function() {}; FactoryProto.prototype.buildJed = function() { diff --git a/packages/js/tests/shared-admin/store/admin-url.test.js b/packages/js/tests/shared-admin/store/admin-url.test.js index 24a925c59e9..c8503e67924 100644 --- a/packages/js/tests/shared-admin/store/admin-url.test.js +++ b/packages/js/tests/shared-admin/store/admin-url.test.js @@ -91,7 +91,6 @@ describe( "adminUrl", () => { * Fake class to throw an error when calling toString. */ class Test { - // eslint-disable-next-line require-jsdoc toString() { throw new Error( "Test error" ); } diff --git a/packages/js/tests/shared-admin/store/wistia-embed-permission.test.js b/packages/js/tests/shared-admin/store/wistia-embed-permission.test.js index a11bec10fbc..b0e72ba03a6 100644 --- a/packages/js/tests/shared-admin/store/wistia-embed-permission.test.js +++ b/packages/js/tests/shared-admin/store/wistia-embed-permission.test.js @@ -95,7 +95,6 @@ describe( "wistiaEmbedPermission", () => { describe( "reducer", () => { it( "returns the initial state", () => { - // eslint-disable-next-line no-undefined expect( wistiaEmbedPermissionReducer( undefined, {} ) ).toEqual( getInitialWistiaEmbedPermissionState() ); } ); @@ -112,7 +111,7 @@ describe( "wistiaEmbedPermission", () => { // Falsy with different types. [ false, "" ], [ false, null ], - // eslint-disable-next-line no-undefined + [ false, undefined ], ] )( "returns the value %p when the input value is %p", ( expected, input ) => { expect( wistiaEmbedPermissionReducer( {}, wistiaEmbedPermissionActions.setWistiaEmbedPermissionValue( input ) ) ) @@ -140,7 +139,7 @@ describe( "wistiaEmbedPermission", () => { // Falsy with different types. [ false, { value: "" } ], [ false, { value: null } ], - // eslint-disable-next-line no-undefined + [ false, { value: undefined } ], // The above, but without the object with value key. [ false, true ], @@ -151,7 +150,7 @@ describe( "wistiaEmbedPermission", () => { [ false, Object ], [ false, "" ], [ false, null ], - // eslint-disable-next-line no-undefined + [ false, undefined ], ] )( "returns the value %p when the input value is %p", ( expected, input ) => { expect( wistiaEmbedPermissionReducer( {}, { @@ -175,7 +174,7 @@ describe( "wistiaEmbedPermission", () => { // Falsy with different types. [ false, { value: "" } ], [ false, { value: null } ], - // eslint-disable-next-line no-undefined + [ false, { value: undefined } ], // The above, but without the object with value key. [ false, true ], @@ -186,7 +185,7 @@ describe( "wistiaEmbedPermission", () => { [ false, Object ], [ false, "" ], [ false, null ], - // eslint-disable-next-line no-undefined + [ false, undefined ], ] )( "returns the value %p when the input value is %p", ( expectedValue, inputValue ) => { expect( wistiaEmbedPermissionReducer( {}, { @@ -322,7 +321,7 @@ describe( "wistiaEmbedPermission", () => { // Falsy with different types. [ false, { payload: "" } ], [ false, { payload: null } ], - // eslint-disable-next-line no-undefined + [ false, { payload: undefined } ], // The above, but without the object with payload key. [ false, true ], @@ -343,7 +342,7 @@ describe( "wistiaEmbedPermission", () => { test.each( [ [ null ], - // eslint-disable-next-line no-undefined + [ undefined ], ] )( "throws a TypeError when passing %p", async( input ) => { expect.assertions( 2 ); diff --git a/packages/related-keyphrase-suggestions/eslint.config.mjs b/packages/related-keyphrase-suggestions/eslint.config.mjs index 9cc199dccfb..8e412907c38 100644 --- a/packages/related-keyphrase-suggestions/eslint.config.mjs +++ b/packages/related-keyphrase-suggestions/eslint.config.mjs @@ -33,6 +33,9 @@ export default [ asyncArrow: "always", }, ], + + // Deviate from the Yoast config to allow for not using the error that is caught. + "no-unused-vars": [ "error", { caughtErrors: "none" } ], }, }, { diff --git a/packages/related-keyphrase-suggestions/package.json b/packages/related-keyphrase-suggestions/package.json index 8ffe04bc238..49a7520a6fa 100644 --- a/packages/related-keyphrase-suggestions/package.json +++ b/packages/related-keyphrase-suggestions/package.json @@ -21,7 +21,7 @@ "watch:js": "yarn build:js --watch", "watch:css": "node ./scripts/watch-css.js", "storybook": "storybook dev -p 6007", - "lint": "eslint . .storybook --max-warnings=0" + "lint": "eslint . --max-warnings=1" }, "devDependencies": { "@babel/cli": "^7.25.9", @@ -50,7 +50,7 @@ "@yoast/tailwindcss-preset": "^2.3.0", "babel-loader": "^9.2.1", "css-loader": "^7.1.2", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.13.0", "postcss": "^8.4.47", diff --git a/packages/related-keyphrase-suggestions/scripts/build-css.js b/packages/related-keyphrase-suggestions/scripts/build-css.js index 29a0869b19f..66fe1d3262d 100644 --- a/packages/related-keyphrase-suggestions/scripts/build-css.js +++ b/packages/related-keyphrase-suggestions/scripts/build-css.js @@ -1,5 +1,5 @@ #!/usr/local/bin/node -/* eslint-disable require-jsdoc */ + const fs = require( "fs" ); const path = require( "path" ); const { execSync } = require( "child_process" ); diff --git a/packages/related-keyphrase-suggestions/scripts/watch-css.js b/packages/related-keyphrase-suggestions/scripts/watch-css.js index fe465e234cd..49dcd65de27 100644 --- a/packages/related-keyphrase-suggestions/scripts/watch-css.js +++ b/packages/related-keyphrase-suggestions/scripts/watch-css.js @@ -1,5 +1,5 @@ #!/usr/local/bin/node -/* eslint-disable jsdoc/require-jsdoc, no-console */ +/* eslint-disable no-console */ const fs = require( "fs" ); const path = require( "path" ); const { execSync } = require( "child_process" ); diff --git a/packages/related-keyphrase-suggestions/src/elements/UserMessage/components/MaxRelatedKeyphrases.js b/packages/related-keyphrase-suggestions/src/elements/UserMessage/components/MaxRelatedKeyphrases.js index 1163519f1e6..ebffcde6f76 100644 --- a/packages/related-keyphrase-suggestions/src/elements/UserMessage/components/MaxRelatedKeyphrases.js +++ b/packages/related-keyphrase-suggestions/src/elements/UserMessage/components/MaxRelatedKeyphrases.js @@ -16,7 +16,6 @@ export const MaxRelatedKeyphrases = ( { className = "" } ) => { { sprintf( /* translators: %s: Expands to "Yoast SEO". */ __( - // eslint-disable-next-line max-len "You've reached the maximum amount of 4 related keyphrases. You can change or remove related keyphrases in the %s metabox or sidebar.", "wordpress-seo", ), diff --git a/packages/related-keyphrase-suggestions/tailwind.config.js b/packages/related-keyphrase-suggestions/tailwind.config.js index f26b4e3cb2f..a7f776d85c0 100644 --- a/packages/related-keyphrase-suggestions/tailwind.config.js +++ b/packages/related-keyphrase-suggestions/tailwind.config.js @@ -1,4 +1,3 @@ -/* eslint-disable global-require */ module.exports = { presets: [ require( "@yoast/tailwindcss-preset" ) ], content: [ diff --git a/packages/replacement-variable-editor/package.json b/packages/replacement-variable-editor/package.json index 0dcbf5c3a4d..ac1e81a0727 100644 --- a/packages/replacement-variable-editor/package.json +++ b/packages/replacement-variable-editor/package.json @@ -51,7 +51,7 @@ "@testing-library/react-hooks": "^8.0.1", "@yoast/browserslist-config": "^1.2.3", "babel-plugin-styled-components": "^2.0.6", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.13.0", "jest-styled-components": "^7.0.3", diff --git a/packages/replacement-variable-editor/src/ReplacementVariableEditorStandalone.js b/packages/replacement-variable-editor/src/ReplacementVariableEditorStandalone.js index a53d30f6386..a7339ac390f 100644 --- a/packages/replacement-variable-editor/src/ReplacementVariableEditorStandalone.js +++ b/packages/replacement-variable-editor/src/ReplacementVariableEditorStandalone.js @@ -1,4 +1,4 @@ -/* eslint-disable camelcase */ + // External dependencies. import React from "react"; import Editor from "@draft-js-plugins/editor"; @@ -52,7 +52,7 @@ const MentionSuggestionsStyleWrapper = styled.div` `; // Regex sources from https://github.com/facebook/draft-js/issues/1105 -// eslint-disable-next-line max-len + const emojiRegExp = new RegExp( "(?:\\p{RI}\\p{RI}|\\p{Emoji}(?:\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(?:\\u{200D}\\p{Emoji}(?:\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*)", "gu" ); /** diff --git a/packages/search-metadata-previews/eslint.config.mjs b/packages/search-metadata-previews/eslint.config.mjs index 07a0d07e726..d7d41869d30 100644 --- a/packages/search-metadata-previews/eslint.config.mjs +++ b/packages/search-metadata-previews/eslint.config.mjs @@ -26,6 +26,9 @@ export default [ }, ], + // Deviate from the Yoast config to allow for not using the error that is caught. + "no-unused-vars": [ "error", { caughtErrors: "none" } ], + // Deviate from the yoast config to allow existing usages of .bind in React components and unused state. New cases are still prohibited. "react/jsx-no-bind": "warn", "react/no-unused-state": "warn", diff --git a/packages/search-metadata-previews/package.json b/packages/search-metadata-previews/package.json index bea1f66d08d..642d411647b 100644 --- a/packages/search-metadata-previews/package.json +++ b/packages/search-metadata-previews/package.json @@ -49,7 +49,7 @@ "@yoast/browserslist-config": "^1.2.3", "babel-plugin-styled-components": "^2.0.6", "browserslist": "^4.7.3", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.13.0", "jest-styled-components": "^7.0.3" diff --git a/packages/search-metadata-previews/src/snippet-editor/SnippetEditor.js b/packages/search-metadata-previews/src/snippet-editor/SnippetEditor.js index 003264a5448..73979e29eb2 100644 --- a/packages/search-metadata-previews/src/snippet-editor/SnippetEditor.js +++ b/packages/search-metadata-previews/src/snippet-editor/SnippetEditor.js @@ -1,4 +1,4 @@ -/* eslint-disable camelcase */ + // External dependencies. import styled from "styled-components"; import React from "react"; @@ -535,7 +535,7 @@ class SnippetEditor extends React.Component { * The SnippetPreview is not a build-in HTML element so this check is not * relevant. */ - /* eslint-disable jsx-a11y/mouse-events-have-key-events */ + return (
@@ -578,7 +578,6 @@ class SnippetEditor extends React.Component {
); - /* eslint-enable jsx-a11y/mouse-events-have-key-events */ } } diff --git a/packages/search-metadata-previews/src/snippet-preview/SnippetPreview.js b/packages/search-metadata-previews/src/snippet-preview/SnippetPreview.js index 18a2ea54e71..7a3cd2b1566 100644 --- a/packages/search-metadata-previews/src/snippet-preview/SnippetPreview.js +++ b/packages/search-metadata-previews/src/snippet-preview/SnippetPreview.js @@ -1,4 +1,4 @@ -/* eslint-disable camelcase */ + // External dependencies. import React, { PureComponent } from "react"; import styled from "styled-components"; @@ -404,7 +404,6 @@ function highlightWords( locale, wordsToHighlight, text, cleanText ) { * @returns {ReactComponent} The vertical dots. */ const VerticalDots = ( { screenMode } ) => { - /* eslint-disable max-len */ return { > ; - /* eslint-enable max-len */ }; VerticalDots.propTypes = { @@ -554,7 +552,7 @@ export default class SnippetPreview extends PureComponent { getDescription() { if ( ! this.props.description ) { return __( - // eslint-disable-next-line max-len + "Please provide a meta description by editing the snippet below. If you don’t, Google will try to find a relevant part of your post to show in the search results.", "wordpress-seo" ); @@ -660,7 +658,7 @@ export default class SnippetPreview extends PureComponent { * The jsx-a11y eslint plugin is asking for an onFocus accompanying the onMouseEnter. * However this is not relevant in this case, because the url is not focusable. */ - /* eslint-disable jsx-a11y/mouse-events-have-key-events */ + return { @@ -690,7 +688,6 @@ export default class SnippetPreview extends PureComponent { ; - /* eslint-enable jsx-a11y/mouse-events-have-key-events */ } @@ -889,7 +886,7 @@ export default class SnippetPreview extends PureComponent { * However this is not relevant in this case, because the title and description are * not focusable. */ - /* eslint-disable jsx-a11y/mouse-events-have-key-events */ + return (
); - /* eslint-enable jsx-a11y/mouse-events-have-key-events */ } /** diff --git a/packages/ui-library/eslint.config.mjs b/packages/ui-library/eslint.config.mjs index 295887f9aa2..94ef920de2f 100644 --- a/packages/ui-library/eslint.config.mjs +++ b/packages/ui-library/eslint.config.mjs @@ -18,6 +18,7 @@ export default [ "error", "always", ], + // Deviate from the Yoast config to allow use of short-circuit and ternary expressions to call functions with side effects, like setState. "no-unused-expressions": [ "error", @@ -26,6 +27,7 @@ export default [ allowTernary: true, }, ], + // Deviate from the Yoast config to force spacing before async arrow function parentheses. "space-before-function-paren": [ "error", @@ -35,6 +37,9 @@ export default [ asyncArrow: "always", }, ], + + // Deviate from the Yoast config to allow for not using the error that is caught. + "no-unused-vars": [ "error", { caughtErrors: "none" } ], }, }, { diff --git a/packages/ui-library/package.json b/packages/ui-library/package.json index d09da8547f5..54f4235781a 100644 --- a/packages/ui-library/package.json +++ b/packages/ui-library/package.json @@ -25,7 +25,7 @@ "publish:storybook": "./scripts/publish-storybook.sh", "test:storyshots": "yarn build:storybook --test --quiet && jest tests/storyshots.js", "t_st": "yarn test:storyshots", - "lint": "eslint . --max-warnings=0" + "lint": "eslint . --max-warnings=3" }, "devDependencies": { "@babel/cli": "^7.23.9", @@ -56,7 +56,7 @@ "@yoast/tailwindcss-preset": "^2.3.0", "babel-loader": "^9.1.3", "css-loader": "^6.10.0", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.12.0", "jest": "^27.5.1", diff --git a/packages/ui-library/postcss.config.js b/packages/ui-library/postcss.config.js index ec5152c4da3..c9853d926db 100644 --- a/packages/ui-library/postcss.config.js +++ b/packages/ui-library/postcss.config.js @@ -1,2 +1 @@ -/* eslint-disable global-require */ module.exports = require( "@yoast/postcss-preset" ); diff --git a/packages/ui-library/scripts/build-css.js b/packages/ui-library/scripts/build-css.js index 251eb56d910..91fd5906d31 100644 --- a/packages/ui-library/scripts/build-css.js +++ b/packages/ui-library/scripts/build-css.js @@ -1,5 +1,5 @@ #!/usr/local/bin/node -/* eslint-disable require-jsdoc */ + const fs = require( "fs" ); const path = require( "path" ); const { execSync } = require( "child_process" ); diff --git a/packages/ui-library/scripts/watch-css.js b/packages/ui-library/scripts/watch-css.js index f912387b0e0..49dcd65de27 100644 --- a/packages/ui-library/scripts/watch-css.js +++ b/packages/ui-library/scripts/watch-css.js @@ -1,5 +1,5 @@ #!/usr/local/bin/node -/* eslint-disable require-jsdoc, no-console */ +/* eslint-disable no-console */ const fs = require( "fs" ); const path = require( "path" ); const { execSync } = require( "child_process" ); diff --git a/packages/ui-library/src/components/radio-group/index.js b/packages/ui-library/src/components/radio-group/index.js index 8540deb9b52..5243b52fb07 100644 --- a/packages/ui-library/src/components/radio-group/index.js +++ b/packages/ui-library/src/components/radio-group/index.js @@ -1,4 +1,4 @@ -/* eslint-disable no-undefined */ + import classNames from "classnames"; import { noop } from "lodash"; import PropTypes from "prop-types"; diff --git a/packages/ui-library/src/components/tooltip-container/index.js b/packages/ui-library/src/components/tooltip-container/index.js index 89b6953d713..09cb493ad3f 100644 --- a/packages/ui-library/src/components/tooltip-container/index.js +++ b/packages/ui-library/src/components/tooltip-container/index.js @@ -1,4 +1,4 @@ -/* eslint-disable react/require-default-props */ + import classNames from "classnames"; import { noop } from "lodash"; import PropTypes from "prop-types"; diff --git a/packages/ui-library/src/elements/badge/index.js b/packages/ui-library/src/elements/badge/index.js index 7263e635ff2..49fcde6da80 100644 --- a/packages/ui-library/src/elements/badge/index.js +++ b/packages/ui-library/src/elements/badge/index.js @@ -1,4 +1,4 @@ -/* eslint-disable no-undefined */ + import classNames from "classnames"; import PropTypes from "prop-types"; import React, { forwardRef } from "react"; diff --git a/packages/ui-library/src/elements/checkbox/index.js b/packages/ui-library/src/elements/checkbox/index.js index e2e05190044..92fc40e54df 100644 --- a/packages/ui-library/src/elements/checkbox/index.js +++ b/packages/ui-library/src/elements/checkbox/index.js @@ -1,4 +1,4 @@ -/* eslint-disable no-undefined */ + import classNames from "classnames"; import PropTypes from "prop-types"; import React, { forwardRef } from "react"; diff --git a/packages/ui-library/src/elements/tag-input/index.js b/packages/ui-library/src/elements/tag-input/index.js index b3095cb9da6..486d5489912 100644 --- a/packages/ui-library/src/elements/tag-input/index.js +++ b/packages/ui-library/src/elements/tag-input/index.js @@ -1,5 +1,5 @@ -/* eslint-disable react/forbid-foreign-prop-types */ -/* eslint-disable jsx-a11y/tabindex-no-positive */ + + import { XIcon } from "@heroicons/react/solid"; import classNames from "classnames"; import { isString, map, noop } from "lodash"; @@ -39,7 +39,7 @@ export const Tag = ( { tag, index, disabled = false, onRemoveTag, screenReaderRe }, [ index, disabled, onRemoveTag ] ); return ( - // eslint-disable-next-line jsx-a11y/no-static-element-interactions + diff --git a/packages/ui-library/src/elements/toast/index.js b/packages/ui-library/src/elements/toast/index.js index 07e0594eac9..2ba3c8d2ec8 100644 --- a/packages/ui-library/src/elements/toast/index.js +++ b/packages/ui-library/src/elements/toast/index.js @@ -1,4 +1,4 @@ -/* eslint-disable complexity */ + import { Transition } from "@headlessui/react"; import { XIcon } from "@heroicons/react/outline"; import classNames from "classnames"; diff --git a/packages/ui-library/tailwind.config.js b/packages/ui-library/tailwind.config.js index 6c7bea36b8f..c66e13ed0fb 100644 --- a/packages/ui-library/tailwind.config.js +++ b/packages/ui-library/tailwind.config.js @@ -1,4 +1,3 @@ -/* eslint-disable global-require */ module.exports = { presets: [ require( "@yoast/tailwindcss-preset" ) ], content: [ "./src/**/*.js", "./src/**/*.mdx", "./src/**/*.md" ], diff --git a/packages/yoastseo/eslint.config.mjs b/packages/yoastseo/eslint.config.mjs index 3f044dcb95a..3ca7beb31b7 100644 --- a/packages/yoastseo/eslint.config.mjs +++ b/packages/yoastseo/eslint.config.mjs @@ -47,6 +47,9 @@ export default [ // Deviate from the Yoast config to ignore imports from premium-configuration, which might not be available in all environments. "import/no-unresolved": [ "error", { ignore: [ "premium-configuration/data/morphologyData" ] } ], + + // Deviate from the Yoast config to allow for not using the error that is caught. + "no-unused-vars": [ "error", { caughtErrors: "none" } ], }, }, { diff --git a/packages/yoastseo/grunt/config/shell.js b/packages/yoastseo/grunt/config/shell.js index e509f06a556..be439b6b4c0 100644 --- a/packages/yoastseo/grunt/config/shell.js +++ b/packages/yoastseo/grunt/config/shell.js @@ -86,7 +86,6 @@ module.exports = function( grunt ) { "get-current-branch": { command: getCurrentBranchCommand, options: { - // eslint-disable-next-line handle-callback-err,require-jsdoc callback: function( err, stdout, stderr, cb ) { grunt.config.set( "currentBranch", stdout ); diff --git a/packages/yoastseo/package.json b/packages/yoastseo/package.json index df459ee13b4..49389446f21 100644 --- a/packages/yoastseo/package.json +++ b/packages/yoastseo/package.json @@ -31,7 +31,7 @@ "clean": "rm -rf build", "pretest": "grunt get-premium-configuration", "test": "jest", - "lint": "eslint . --max-warnings 25" + "lint": "eslint . --max-warnings 26" }, "engines": { "node": ">=8.0.0" @@ -43,7 +43,7 @@ "@yoast/browserslist-config": "^1.2.3", "blob-polyfill": "^7.0.20220408", "console.table": "^0.10.0", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-yoast": "^6.0.0", "globals": "^15.12.0", "grunt": "^1.6.1", diff --git a/packages/yoastseo/spec/bundledPlugins/previouslyUsedKeywordsSpec.js b/packages/yoastseo/spec/bundledPlugins/previouslyUsedKeywordsSpec.js index e66d9013c9a..77b9adc257d 100644 --- a/packages/yoastseo/spec/bundledPlugins/previouslyUsedKeywordsSpec.js +++ b/packages/yoastseo/spec/bundledPlugins/previouslyUsedKeywordsSpec.js @@ -138,9 +138,8 @@ describe( "previously used keyphrase when postTypeToDisplay is defined and count describe( "Test previouslyUsedKeywords when app is undefined", () => { it( "should throw an error if app is undefined", () => { - // eslint-disable-next-line no-undefined expect( () => { - // eslint-disable-next-line no-new,no-undefined + // eslint-disable-next-line no-undefined new PreviouslyUsedKeywords( undefined, {} ); } ).toThrow( MissingArgumentError ); } ); diff --git a/packages/yoastseo/spec/fullTextTests/runFullTextTests.js b/packages/yoastseo/spec/fullTextTests/runFullTextTests.js index f43f128c4ce..9c095856865 100644 --- a/packages/yoastseo/spec/fullTextTests/runFullTextTests.js +++ b/packages/yoastseo/spec/fullTextTests/runFullTextTests.js @@ -45,7 +45,6 @@ import { getLanguagesWithWordComplexity } from "../../src/helpers"; import testPapers from "./testTexts"; testPapers.forEach( function( testPaper ) { - // eslint-disable-next-line max-statements describe( "Full-text test for paper " + testPaper.name, function() { const paper = testPaper.paper; const locale = paper.getLocale(); diff --git a/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js index 99b875a679e..7d0a949f3d7 100644 --- a/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js +++ b/packages/yoastseo/spec/languageProcessing/helpers/match/matchTextWithWordSpec.js @@ -41,7 +41,6 @@ describe( "Counts the occurences of a word in a string", function() { expect( wordMatch( "Yoast's analyzer", "Yoast’s", "en_US" ).matches ).toEqual( [ "Yoast's" ] ); } ); - // eslint-disable-next-line max-statements it( "should match special characters", function() { expect( wordMatch( "a string with diacritics äöüß oompaloomp", "äöüß oompaloomp", "de_DE" ).count ).toBe( 1 ); expect( wordMatch( "a string with diacritics äöüß oompaloomp", "äöüß oompaloomp", "de_DE" ).matches ).toEqual( [ "äöüß oompaloomp" ] ); diff --git a/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js b/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js index 8ed67fa4ece..4b227e50e78 100644 --- a/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js +++ b/packages/yoastseo/spec/languageProcessing/helpers/transliterate/transliterateSpec.js @@ -1,6 +1,5 @@ import transliteration from "../../../../src/languageProcessing/helpers/transliterate/transliterate.js"; -// eslint-disable-next-line max-statements describe( "A test for removing special characters from text.", function() { it( "returns a Spanish string without special characters.", function() { expect( transliteration( "ñáéíóúüÑÁÉÍÓÚÜ", "es_AR" ) ).toBe( "naeiouuNAEIOUU" ); diff --git a/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js index 14507e7bbbd..d09930b4e82 100644 --- a/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js +++ b/packages/yoastseo/spec/languageProcessing/languages/de/config/syllablesSpec.js @@ -1,7 +1,6 @@ import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js"; import germanSyllables from "../../../../../src/languageProcessing/languages/de/config/syllables.json"; -// eslint-disable-next-line max-statements describe( "a syllable counter for German text strings", function() { it( "returns the number of syllables of words containing the subtract syllable ouil", function() { expect( countSyllableFunction( "bouillon", germanSyllables ) ).toBe( 2 ); diff --git a/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js index 447b4a870c5..c5b5179cb58 100644 --- a/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js +++ b/packages/yoastseo/spec/languageProcessing/languages/en/config/syllablesSpec.js @@ -1,7 +1,6 @@ import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js"; import englishSyllables from "../../../../../src/languageProcessing/languages/en/config/syllables.json"; -// eslint-disable-next-line max-statements describe( "a syllable counter for English text strings", function() { it( "returns the number of syllables of words containing the subtract syllable cial", function() { expect( countSyllableFunction( "special", englishSyllables ) ).toBe( 2 ); diff --git a/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js index f6dc99c7dd9..292ecf27990 100644 --- a/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js +++ b/packages/yoastseo/spec/languageProcessing/languages/it/config/syllablesSpec.js @@ -1,7 +1,6 @@ import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js"; import italianSyllables from "../../../../../src/languageProcessing/languages/it/config/syllables.json"; -// eslint-disable-next-line max-statements describe( "a syllable counter for Italian text strings", function() { // I cannot find an example for 'aí', but theoretically this combination would be 2 syllables. it( "returns the number of syllables of words containing the subtract syllable a[íúeo]", function() { diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js b/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js index 3599519f43c..6ab0d544ddc 100644 --- a/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js +++ b/packages/yoastseo/spec/languageProcessing/languages/nl/config/syllablesSpec.js @@ -1,7 +1,6 @@ import countSyllableFunction from "../../../../../src/languageProcessing/helpers/syllables/countSyllables.js"; import dutchSyllables from "../../../../../src/languageProcessing/languages/nl/config/syllables.json"; -// eslint-disable-next-line max-statements describe( "a syllable counter for Dutch text strings", function() { it( "returns the number of syllables of words containing the subtract syllable ue$", function() { expect( countSyllableFunction( "cue", dutchSyllables ) ).toBe( 1 ); diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js index 9132f86b440..58840fcc88e 100644 --- a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js +++ b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticipleSpec.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line max-len import { detectAndStemRegularParticiple } from "../../../../../../src/languageProcessing/languages/nl/helpers/internal/detectAndStemRegularParticiple"; import getMorphologyData from "../../../../../specHelpers/getMorphologyData"; diff --git a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js index 3d078ead69a..72529930bb9 100644 --- a/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js +++ b/packages/yoastseo/spec/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEndingSpecs.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line max-len import { generateCorrectStemWithTAndDEnding } from "../../../../../../src/languageProcessing/languages/nl/helpers/internal/getStemWordsWithTAndDEnding"; import getMorphologyData from "../../../../../specHelpers/getMorphologyData"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js b/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js index 9400c8b16fb..f929030f02f 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/altTagCountSpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments, spaced-comment */ import Researcher from "../../../src/languageProcessing/languages/en/Researcher"; import getMorphologyData from "../../specHelpers/getMorphologyData"; import altTagCountFunction from "../../../src/languageProcessing/researches/altTagCount"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js b/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js index ee23501f00a..7ae2a60367c 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/countSentencesFromTextSpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments, spaced-comment */ import getSentences from "../../../src/languageProcessing/researches/countSentencesFromText.js"; import Paper from "../../../src/values/Paper"; import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js b/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js index eb2167f499f..6a361eaf5f6 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/findKeyphraseInSEOTitleSpec.js @@ -23,7 +23,6 @@ const morphologyDataHE = getMorphologyData( "he" ); let result; -// eslint-disable-next-line max-statements describe( "Matches keyphrase in SEO title", function() { it( "returns the exact match and its position", function() { const mockPaper = new Paper( "", { diff --git a/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js b/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js index acc7d5109cc..2f565556281 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/findKeywordInFirstParagraphSpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments, spaced-comment */ import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Researcher"; import firstParagraph from "../../../src/languageProcessing/researches/findKeywordInFirstParagraph.js"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js index 69234009b9f..a9d588a7d8c 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/findTransitionWordsSpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments, spaced-comment */ import transitionWordsResearch from "../../../src/languageProcessing/researches/findTransitionWords.js"; import Paper from "../../../src/values/Paper.js"; import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; @@ -19,7 +18,6 @@ import RussianResearcher from "../../../src/languageProcessing/languages/ru/Rese import HebrewResearcher from "../../../src/languageProcessing/languages/he/Researcher"; import ArabicResearcher from "../../../src/languageProcessing/languages/ar/Researcher"; -// eslint-disable-next-line max-statements describe( "a test for finding transition words from a string", function() { let mockPaper, result; diff --git a/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js b/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js index 34a74c8ff9d..276ebe7d356 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/functionWordsInKeyphraseSpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments, spaced-comment */ import functionWordsInKeyphrase from "../../../src/languageProcessing/researches/functionWordsInKeyphrase.js"; import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; import IndonesianResearcher from "../../../src/languageProcessing/languages/id/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js index e014c721217..75258af56b9 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getFleschReadingScoreSpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments */ import fleschFunction, { DIFFICULTY } from "../../../src/languageProcessing/researches/getFleschReadingScore"; import Paper from "../../../src/values/Paper.js"; import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js b/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js index 511bbc3e5a9..f41eed894b1 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getKeywordDensitySpec.js @@ -1,4 +1,3 @@ -/* eslint-disable capitalized-comments, spaced-comment */ import getKeywordDensity from "../../../src/languageProcessing/researches/getKeywordDensity.js"; import Paper from "../../../src/values/Paper.js"; import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js index a2efeb825d9..c77af16a4f1 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getLinkStatisticsSpec.js @@ -4,7 +4,7 @@ import Paper from "../../../src/values/Paper.js"; let foundLinks; -// eslint-disable-next-line max-statements + describe( "Tests a string for anchors and its attributes", function() { const paperAttributes = { keyword: "link", diff --git a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js index 525f07ba971..b9344151705 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultEnglishSpec.js @@ -3,7 +3,7 @@ import Paper from "../../../../src/values/Paper.js"; import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher"; // Tests inspired by the examples on http://www.englishpage.com/verbpage/activepassive.html -// eslint-disable-next-line max-statements + describe( "detecting passive voice in sentences", function() { it( "returns active voice (Simple Present)", function() { const paper = new Paper( "Once a week, Tom cleans the house." ); diff --git a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js index 38233f8de23..7870b34aabe 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getPassiveVoiceResult/getPassiveVoiceResultFrenchSpec.js @@ -2,7 +2,7 @@ import passiveVoice from "../../../../src/languageProcessing/researches/getPassi import Paper from "../../../../src/values/Paper.js"; import Researcher from "../../../../src/languageProcessing/languages/fr/Researcher"; -// eslint-disable-next-line max-statements + describe( "detecting passive voice in sentences", function() { it( "returns active voice (présent)", function() { const paper = new Paper( "Je mange une pomme.", { locale: "fr_FR" } ); diff --git a/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js index c0ed0f9380b..e63e4ab08e5 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getSentenceBeginningsSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import getSentenceBeginnings from "../../../src/languageProcessing/researches/getSentenceBeginnings"; import Paper from "../../../src/values/Paper.js"; @@ -8,7 +8,7 @@ import SpanishResearcher from "../../../src/languageProcessing/languages/es/Rese import GreekResearcher from "../../../src/languageProcessing/languages/el/Researcher"; import JapaneseResearcher from "../../../src/languageProcessing/languages/ja/Researcher"; -// eslint-disable-next-line max-statements + describe( "gets the sentence beginnings and the count of consecutive duplicates.", function() { let mockPaper = new Paper( "How are you? Bye!" ); let researcher = new EnglishResearcher( mockPaper ); diff --git a/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js index cc63cb87b9e..245e094b5bb 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/getWordFormsSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; import ItalianResearcher from "../../../src/languageProcessing/languages/it/Researcher"; import SwedishResearcher from "../../../src/languageProcessing/languages/sv/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js b/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js index f561a3331ce..de99ad4bd44 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/keyphraseDistributionSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import { computeScoresPerSentenceShortTopic, computeScoresPerSentenceLongTopic, diff --git a/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js b/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js index c87922fb3ec..f262ef4f7c8 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/keywordCountInUrlSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments */ + import { keywordCountInSlug as slugKeyword, keywordCountInUrl as urlKeyword } from "../../../src/languageProcessing/researches/keywordCountInUrl.js"; import Paper from "../../../src/values/Paper.js"; import EnglishResearcher from "../../../src/languageProcessing/languages/en/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js b/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js index 609d63776fd..a34b16c708e 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/matchKeywordInSubheadingsSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments */ + import matchKeywordInSubheadings from "../../../src/languageProcessing/researches/matchKeywordInSubheadings"; import Paper from "../../../src/values/Paper"; import Researcher from "../../../src/languageProcessing/languages/en/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js index 3ea65a77ae3..7da559a61ac 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionKeywordSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import metaDescriptionKeyword from "../../../src/languageProcessing/researches/metaDescriptionKeyword.js"; import Paper from "../../../src/values/Paper.js"; import Researcher from "../../../src/languageProcessing/languages/en/Researcher"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js index 2d640141cba..73c5bdbbcee 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/metaDescriptionLengthSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments */ + import metaDescriptionLength from "../../../src/languageProcessing/researches/metaDescriptionLength.js"; import Paper from "../../../src/values/Paper.js"; diff --git a/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js b/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js index 1d183cdd0e8..98cbaf1cca7 100644 --- a/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js +++ b/packages/yoastseo/spec/languageProcessing/researches/wordComplexitySpec.js @@ -1,4 +1,4 @@ -/* eslint-disable max-statements */ + import wordComplexity from "../../../src/languageProcessing/researches/wordComplexity.js"; import Paper from "../../../src/values/Paper"; @@ -198,7 +198,6 @@ describe( "test with different language specific helper and config", () => { } ); it( "should not recognize German function words to be complex, no matter whether they are capitalized or not", () => { - // eslint-disable-next-line max-len const paper = new Paper( "Nach der von Erzbischof Hinkmar von Reims gebildeten Legende hat gegen Ende des 5. Wahrscheinlichkeit verhältnismäßig." ); const researcher = new GermanResearcher( paper ); researcher.addHelper( "checkIfWordIsComplex", wordComplexityHelperGerman ); diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js index 9f6952c5768..95df5a341c7 100644 --- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/cultureAssessmentsSpec.js @@ -55,7 +55,7 @@ describe( "A test for Culture Assessments", () => { } ); } ); -// eslint-disable-next-line max-statements + describe( "a test for targeting non-inclusive phrases in culture assessments", () => { it( "should return the appropriate score and feedback string for: 'Third World'", () => { const testData = [ diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js index 006ac9493d5..09293f1b8b4 100644 --- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/configuration/disabilityAssessmentsSpec.js @@ -391,7 +391,7 @@ describe( "A test for Disability assessments", function() { } ); } ); -// eslint-disable-next-line max-statements + describe( "a test for targeting non-inclusive phrases in disability assessments", () => { it( "should return the appropriate score and feedback string for: 'binge' and its other forms", () => { const testData = [ diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js index fc62b0df40a..df0a08afab6 100644 --- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js @@ -12,7 +12,7 @@ describe( "Test isFollowedAndPrecededByException", () => { const callback = isFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( true ); } ); it( "returns false when a term is followed but not preceded by an exception", () => { @@ -23,7 +23,7 @@ describe( "Test isFollowedAndPrecededByException", () => { const callback = isFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( false ); } ); it( "returns false when a term is preceded but not followed by an exception", () => { @@ -34,7 +34,7 @@ describe( "Test isFollowedAndPrecededByException", () => { const callback = isFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( false ); } ); } ); @@ -48,7 +48,7 @@ describe( "Test isNotFollowedAndPrecededByException", () => { const callback = isNotFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( false ); } ); it( "returns true when a term is followed but not preceded by an exception", () => { @@ -59,7 +59,7 @@ describe( "Test isNotFollowedAndPrecededByException", () => { const callback = isNotFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( true ); } ); it( "returns true when a term is preceded but not followed by an exception", () => { @@ -70,7 +70,7 @@ describe( "Test isNotFollowedAndPrecededByException", () => { const callback = isNotFollowedAndPrecededByException( words, consecutiveWords, precedingExceptions, followingExceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( true ); } ); } ); diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js index 1f0818a430b..6a150dc6bba 100644 --- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByExceptionSpec.js @@ -11,7 +11,7 @@ describe( "Test isFollowedByException", () => { const callback = isFollowedByException( words, consecutiveWords, exceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( true ); } ); it( "returns the right value when term is not followed by an exception", () => { @@ -21,7 +21,7 @@ describe( "Test isFollowedByException", () => { const callback = isFollowedByException( words, consecutiveWords, exceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( false ); } ); } ); diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js index d772312237a..535d30817df 100644 --- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isFollowedByParticipleSpec.js @@ -22,7 +22,7 @@ describe( "test isFollowedByParticiple and isNotFollowedByParticiple", () => { const callback = isFollowedByParticiple( words, consecutiveWords ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( true ); } ); it( "returns the right value when term is NOT followed by a participle", () => { @@ -31,7 +31,7 @@ describe( "test isFollowedByParticiple and isNotFollowedByParticiple", () => { const callback = isFollowedByParticiple( words, consecutiveWords ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( false ); } ); } ); diff --git a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js index 96becfa2877..84be6e609cc 100644 --- a/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/inclusiveLanguage/helpers/isPrecededByExceptionSpec.js @@ -10,7 +10,7 @@ xdescribe( "Test isFollowedByException", () => { const callback = isNotPrecededByException( words, exceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( true ); } ); it( "returns the right value when term is not preceded by an exception", () => { @@ -19,7 +19,7 @@ xdescribe( "Test isFollowedByException", () => { const callback = isNotPrecededByException( words, exceptions ); const index = 1; - // eslint-disable-next-line callback-return + expect( callback( index ) ).toEqual( false ); } ); } ); diff --git a/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js index 654d1e0c812..1dd2df820ca 100644 --- a/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/readability/SentenceBeginningsAssessmentSpec.js @@ -7,7 +7,7 @@ import Mark from "../../../../src/values/Mark.js"; import EnglishResearcher from "../../../../src/languageProcessing/languages/en/Researcher"; let paper = new Paper(); -// eslint-disable-next-line max-statements + describe( "An assessment for scoring repeated sentence beginnings.", function() { it( "scores one instance with 4 consecutive sentences starting with the same word.", function() { const assessment = new SentenceBeginningsAssessment().getResult( paper, Factory.buildMockResearcher( [ { word: "hey", count: 2 }, diff --git a/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js index f5fb97c36db..6a6fe60141f 100644 --- a/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/readability/SentenceLengthInTextAssessmentSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import SentenceLengthInTextAssessment from "../../../../src/scoring/assessments/readability/SentenceLengthInTextAssessment"; import Paper from "../../../../src/values/Paper.js"; @@ -20,7 +20,7 @@ const longSentence15WordsLimit = "Word ".repeat( 15 ) + "word. "; import japaneseConfig from "../../../../src/languageProcessing/languages/ja/config/sentenceLength"; -// eslint-disable-next-line max-statements + describe( "An assessment for sentence length", function() { it( "returns the score for all short sentences using the default config", function() { const mockPaper = new Paper( shortSentenceDefault ); diff --git a/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js index a8a19be98e0..693f4436c21 100644 --- a/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/readability/SubheadingDistributionTooLongAssessmentSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import SubheadingDistributionTooLong from "../../../../src/scoring/assessments/readability/SubheadingDistributionTooLongAssessment.js"; import Paper from "../../../../src/values/Paper.js"; import Factory from "../../../../src/helpers/factory.js"; diff --git a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js index d29b4e950c1..c56e8ec73e1 100644 --- a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseInImageTextAssessmentSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import KeyphraseInImagesAssessment from "../../../../src/scoring/assessments/seo/KeyphraseInImageTextAssessment"; import Paper from "../../../../src/values/Paper.js"; import Factory from "../../../../src/helpers/factory.js"; diff --git a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js index 61607d3e87b..e8c9004cd7f 100644 --- a/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/seo/KeyphraseLengthAssessmentSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import { merge } from "lodash"; import KeyphraseLengthAssessment from "../../../../src/scoring/assessments/seo/KeyphraseLengthAssessment"; diff --git a/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js index 59c1a25e00f..780d1767a3c 100644 --- a/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/seo/MetaDescriptionKeywordAssessmentSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import MetaDescriptionKeywordAssessment from "../../../../src/scoring/assessments/seo/MetaDescriptionKeywordAssessment"; import Paper from "../../../../src/values/Paper"; import Factory from "../../../../src/helpers/factory"; diff --git a/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js b/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js index 086d2455bde..ee080a73688 100644 --- a/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js +++ b/packages/yoastseo/spec/scoring/assessments/seo/SubHeadingsKeywordAssessmentSpec.js @@ -1,4 +1,4 @@ -/* eslint-disable capitalized-comments, spaced-comment */ + import SubheadingsKeywordAssessment from "../../../../src/scoring/assessments/seo/SubHeadingsKeywordAssessment"; import Paper from "../../../../src/values/Paper"; import Factory from "../../../../src/helpers/factory"; diff --git a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js index 84a7924423f..cb9599b8048 100644 --- a/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js +++ b/packages/yoastseo/spec/scoring/assessors/collectionPages/fullTextTests/runFullTextTests.js @@ -36,7 +36,6 @@ import WordComplexityAssessment from "../../../../../src/scoring/assessments/rea import testPapers from "./testTexts"; testPapers.forEach( function( testPaper ) { - // eslint-disable-next-line max-statements describe( "Full-text test for paper " + testPaper.name, function() { const paper = testPaper.paper; const locale = paper.getLocale(); diff --git a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js index 0a70121e742..8faaef889a8 100644 --- a/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js +++ b/packages/yoastseo/spec/scoring/assessors/productPages/fullTextTests/runFullTextTests.js @@ -45,7 +45,6 @@ import WordComplexityAssessment from "../../../../../src/scoring/assessments/rea import testPapers from "./testTexts"; testPapers.forEach( function( testPaper ) { - // eslint-disable-next-line max-statements describe( "Full-text test for paper " + testPaper.name, function() { const paper = testPaper.paper; const locale = paper.getLocale(); diff --git a/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js b/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js index 8f133b0dcaa..a446e5eaf46 100644 --- a/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js +++ b/packages/yoastseo/spec/specHelpers/buildTreeFromYaml.js @@ -117,7 +117,7 @@ class TreeFromYaml { * * @returns {module:parsedPaper/structure.Node} The parsed tree. */ - parse( parameters ) { // eslint-disable-line complexity + parse( parameters ) { /* Type of node to add. The type should be the first (and only) key of the JSON object. diff --git a/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js b/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js index cf7f579feb3..8d99afa9bb6 100644 --- a/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js +++ b/packages/yoastseo/spec/specHelpers/scoring/seoAssessorTests.js @@ -4,7 +4,7 @@ import KeyphraseDistributionAssessment from "../../../src/scoring/assessments/se import keyphraseDistribution from "../../../src/languageProcessing/researches/keyphraseDistribution"; /* eslint-disable complexity */ -/* eslint-disable max-statements */ + /** * Checks which assessment are available for an SEO assessor, given a certain Paper. * @param {Assessor} assessor The SEO assessor. @@ -167,7 +167,7 @@ export function checkAssessmentAvailability( assessor, isProductAssessor = false } ); } /* eslint-enable complexity */ -/* eslint-enable max-statements */ + /** * Checks the config overrides for a given SEO assessor. diff --git a/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js b/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js index 964d4d83977..b49d21cdb8c 100644 --- a/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js +++ b/packages/yoastseo/spec/worker/AnalysisWebWorkerSpec.js @@ -625,7 +625,7 @@ describe( "AnalysisWebWorker", () => { // Mock the console to see if it is used and to not output anything for real. // eslint-disable-next-line no-console console.log = jest.fn(); - // eslint-disable-next-line no-console + console.error = jest.fn(); // Mock the first function call in analyze to throw an error. @@ -640,7 +640,7 @@ describe( "AnalysisWebWorker", () => { expect( result.error ).toBe( "An error occurred while running the analysis.\n\tError: Simulated error!" ); // eslint-disable-next-line no-console expect( console.log ).toHaveBeenCalled(); - // eslint-disable-next-line no-console + expect( console.error ).toHaveBeenCalled(); done(); }; diff --git a/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js b/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js index 59f393b517c..aaa5641d602 100644 --- a/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js +++ b/packages/yoastseo/spec/worker/wrapTryCatchAroundActionSpec.js @@ -110,7 +110,7 @@ describe( "wrapTryAroundAction", function() { // Mute the actual logs. // eslint-disable-next-line no-console console.debug = jest.fn(); - // eslint-disable-next-line no-console + console.error = jest.fn(); wrapper().then( result => { @@ -118,7 +118,7 @@ describe( "wrapTryAroundAction", function() { expect( result.error ).toBe( "Error: Testing error!" ); // eslint-disable-next-line no-console expect( console.debug ).toHaveBeenCalledTimes( 1 ); - // eslint-disable-next-line no-console + expect( console.error ).toHaveBeenCalledTimes( 1 ); done(); diff --git a/packages/yoastseo/src/app.js b/packages/yoastseo/src/app.js index 81aedbbf1d5..be791dd9b17 100644 --- a/packages/yoastseo/src/app.js +++ b/packages/yoastseo/src/app.js @@ -814,7 +814,6 @@ class App { * @returns {void} */ switchAssessors( useCornerStone ) { - // eslint-disable-next-line no-console console.warn( "Switch assessor is deprecated since YoastSEO.js version 1.35.0" ); this.changeAssessorOptions( { diff --git a/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js b/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js index a3fd70f5597..e8206922e40 100644 --- a/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js +++ b/packages/yoastseo/src/languageProcessing/languages/sk/helpers/internal/stem.js @@ -1,4 +1,4 @@ -/* eslint-disable max-statements,complexity */ +/* eslint-disable complexity */ /* * The MIT License (MIT) * diff --git a/packages/yoastseo/src/parsedPaper/research/researches/Research.js b/packages/yoastseo/src/parsedPaper/research/researches/Research.js index 5066f00b8cf..97f918282e1 100644 --- a/packages/yoastseo/src/parsedPaper/research/researches/Research.js +++ b/packages/yoastseo/src/parsedPaper/research/researches/Research.js @@ -17,7 +17,7 @@ class Research { * @returns {boolean} If the given node is considered a leaf node for this research. * */ - isLeafNode( node ) { // eslint-disable-line no-unused-vars + isLeafNode( node ) { return node instanceof LeafNode; } @@ -42,7 +42,7 @@ class Research { * * @returns {*} The merged results. */ - mergeChildrenResults( results ) { // eslint-disable-line no-unused-vars + mergeChildrenResults( results ) { return flatten( results ); } } diff --git a/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js b/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js index 09556b3ed93..1896119e0eb 100644 --- a/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js +++ b/packages/yoastseo/src/scoring/assessments/seo/TextLengthAssessment.js @@ -138,7 +138,7 @@ export default class TextLengthAssessment extends Assessment { %4$s expands to the anchor end tag, %5$d expands to the recommended minimum of words / characters, %6$s expands to the word 'words' or 'characters'. */ __( - // eslint-disable-next-line max-len + "%2$sText length%4$s: The text contains %1$d %6$s. This is slightly below the recommended minimum of %5$d %6$s. %3$sAdd more content%4$s.", "wordpress-seo" ), @@ -160,9 +160,9 @@ export default class TextLengthAssessment extends Assessment { %4$s expands to the anchor end tag, %5$d expands to the recommended minimum of words / characters, %6$s expands to the word 'word' or 'character', %7$s expands to the word 'words' or 'characters'. */ _n( - // eslint-disable-next-line max-len + "%2$sText length%4$s: The text contains %1$d %6$s. This is below the recommended minimum of %5$d %7$s. %3$sAdd more content%4$s.", - // eslint-disable-next-line max-len + "%2$sText length%4$s: The text contains %1$d %7$s. This is below the recommended minimum of %5$d %7$s. %3$sAdd more content%4$s.", wordCount, "wordpress-seo" diff --git a/packages/yoastseo/src/worker/AnalysisWebWorker.js b/packages/yoastseo/src/worker/AnalysisWebWorker.js index 42efb800333..f4079915ab5 100644 --- a/packages/yoastseo/src/worker/AnalysisWebWorker.js +++ b/packages/yoastseo/src/worker/AnalysisWebWorker.js @@ -1,4 +1,4 @@ -/* eslint-disable max-statements,complexity */ +/* eslint-disable complexity */ // External dependencies. import { enableFeatures } from "@yoast/feature-flag"; import { __, setLocaleData, sprintf } from "@wordpress/i18n"; diff --git a/yarn.lock b/yarn.lock index 37040209354..009fa7fa9f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2992,21 +2992,6 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - "@eslint/eslintrc@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" @@ -3027,16 +3012,6 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.53.0.tgz#bea56f2ed2b5baea164348ff4d5a879f6f81f20d" integrity sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w== -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== - -"@eslint/js@9.15.0": - version "9.15.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.15.0.tgz#df0e24fe869143b59731942128c19938fdbadfb5" - integrity sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg== - "@eslint/js@9.16.0": version "9.16.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.16.0.tgz#3df2b2dd3b9163056616886c86e4082f45dbf3f4" @@ -3169,15 +3144,6 @@ debug "^4.1.1" minimatch "^3.0.5" -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" @@ -3188,11 +3154,6 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" - integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== - "@humanwhocodes/retry@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" @@ -15975,90 +15936,6 @@ eslint@^8.3.0: strip-ansi "^6.0.1" text-table "^0.2.0" -eslint@^8.57.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -eslint@^9.15.0: - version "9.15.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.15.0.tgz#77c684a4e980e82135ebff8ee8f0a9106ce6b8a6" - integrity sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.12.1" - "@eslint/config-array" "^0.19.0" - "@eslint/core" "^0.9.0" - "@eslint/eslintrc" "^3.2.0" - "@eslint/js" "9.15.0" - "@eslint/plugin-kit" "^0.2.3" - "@humanfs/node" "^0.16.6" - "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.4.1" - "@types/estree" "^1.0.6" - "@types/json-schema" "^7.0.15" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.5" - debug "^4.3.2" - escape-string-regexp "^4.0.0" - eslint-scope "^8.2.0" - eslint-visitor-keys "^4.2.0" - espree "^10.3.0" - esquery "^1.5.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^8.0.0" - find-up "^5.0.0" - glob-parent "^6.0.2" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - json-stable-stringify-without-jsonify "^1.0.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - eslint@^9.16.0: version "9.16.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.16.0.tgz#66832e66258922ac0a626f803a9273e37747f2a6"