chore(deps): update dependency typescript-eslint to v8.59.0 (#67143)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2026-04-28 17:32:35 +05:30
committed by GitHub
parent 7f44912d81
commit aa7c01c293
10 changed files with 93 additions and 97 deletions
@@ -116,16 +116,11 @@ function FormFields({ formFields, options }: FormFieldsProps): JSX.Element {
required={required.includes(name)}
rows={4}
type={types[name] || 'text'}
value={value as string}
value={value}
aria-describedby={`${name}-message`}
data-playwright-test-label={`${name}-form-control`}
/>
{nullOrWarning(
value as string,
!pristine && error,
isURL,
name
)}
{nullOrWarning(value, !pristine && error, isURL, name)}
</FormGroup>
);
}}
+5 -3
View File
@@ -1,4 +1,4 @@
import React, { FormEvent } from 'react';
import React from 'react';
import { Form } from 'react-final-form';
import normalizeUrl from 'normalize-url';
@@ -126,13 +126,15 @@ export const StrictSolutionForm = ({
{({ handleSubmit, pristine, error }) => (
<form
id={`dynamic-${id}`}
onSubmit={handleSubmit as (e: FormEvent) => void}
onSubmit={event => {
void handleSubmit(event);
}}
style={{ width: '100%' }}
data-playwright-test-label='form-helper-form'
>
<FormFields formFields={formFields} options={options} />
<BlockSaveButton
disabled={(pristine && !enableSubmit) || (error as boolean)}
disabled={(pristine && !enableSubmit) || Boolean(error)}
>
{buttonText}
</BlockSaveButton>
@@ -213,7 +213,7 @@ function CertificationSettings(props: CertificationSettingsProps) {
const showExamResults = () => {
setProjectTitle(projectTitle);
setExamResults(examResults as GeneratedExamResults);
setExamResults(examResults);
openModal('examResults');
};
@@ -39,7 +39,7 @@ export default function ScrollbarWidthSettings(): JSX.Element {
{t('settings.scrollbar-width')}:
<span
className='scrollbar-width-preview'
style={{ width: `${scrollbarWidth}px` } as React.CSSProperties}
style={{ width: `${scrollbarWidth}px` }}
/>
</label>
<div className='scrollbar-width-container'>
@@ -23,8 +23,7 @@ interface BuildChallengeData extends Context {
export async function getTestRunner(buildData: BuildChallengeData) {
const { challengeType } = buildData;
// TODO: Fully type BuildChallengeData
const type =
runnerTypes[challengeType as unknown as keyof typeof runnerTypes];
const type = runnerTypes[challengeType];
if (!type) {
throw new Error(
`Cannot get test runner for challenge type ${challengeType}`
@@ -48,7 +48,7 @@ const mapStateToProps = (state: unknown, ownProps: { block: string }) => {
isExpanded,
completedChallengeIds: completedChallenges.map(({ id }) => id)
})
)(state as Record<string, unknown>);
)(state);
};
const mapDispatchToProps = (dispatch: Dispatch) =>
@@ -38,7 +38,7 @@ const mapStateToProps = (state: unknown) => {
fetchState,
isSignedIn
})
)(state as Record<string, unknown>);
)(state);
};
const CertChallenge = ({
+3 -3
View File
@@ -19,7 +19,7 @@ describe('client/src utilities', () => {
describe('isHandledError', () => {
it('returns a boolean', () => {
expect(typeof isHandledError({} as Error)).toEqual('boolean');
expect(typeof isHandledError({})).toEqual('boolean');
});
it('returns false for an unhandled error', () => {
@@ -39,14 +39,14 @@ describe('client/src utilities', () => {
// we need to make these tests more robust 💪
it('returns an error with a handledError property', () => {
const handledError = wrapHandledError(
new Error() as HandledError,
new Error(),
mockHandledErrorData
);
expect(handledErrorSymbol in handledError).toEqual(true);
});
it('assigns error handling details to the handledError property', () => {
const handledError = wrapHandledError(
new Error() as HandledError,
new Error(),
mockHandledErrorData
);
expect(handledError[handledErrorSymbol]).toEqual(mockHandledErrorData);
+1 -1
View File
@@ -76,7 +76,7 @@ if (FREECODECAMP_NODE_ENV !== 'development') {
donationKeys,
abTestingKeys
);
const actualVariables = Object.keys(env as Record<string, unknown>);
const actualVariables = Object.keys(env);
if (expectedVariables.length !== actualVariables.length) {
const extraVariables = actualVariables
.filter(x => !expectedVariables.includes(x))