Skip to content

Commit

Permalink
Update ESLint config for TypeScript files (#40584)
Browse files Browse the repository at this point in the history
* Update ESLint config for TypeScript files

* Change no-undefined-types to warning

* Remove unsed eslint-disable

* Restore 'jsdoc/require-returns'

* Turn off jsdoc/no-undefined-types

* Fix lints caused by turning off "jsdoc/no-undefined-types"

* Clean up jetpack-mu-wpcom/eslint.config.mjs

* Add changelog

* Restore plugins/jetpack/.eslintignore

* Turn back jsdoc/no-undefined-types ON with disabled reporting

* Re-enable param rules for now

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12346755392

Upstream-Ref: Automattic/jetpack@9f6b920
  • Loading branch information
manzoorwanijk authored and matticbot committed Dec 16, 2024
1 parent 2740df6 commit e0331d4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ This is an alpha version! The changes listed here are not final.
### Changed
- Updated package dependencies.

### Fixed
- Fixed lints following ESLint rule changes for TS

## [0.25.1] - 2024-12-09
### Changed
- AI Assistant: Add disclaimer to image generation modals [#40397]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type FairUsageNoticeProps = {
* The fair usage notice component.
* @param {FairUsageNoticeProps} props - Fair usage notice component props.
* @param {FairUsageNoticeProps.variant} props.variant - The variant of the notice to render.
* @return {ReactElement} the Notice component with the fair usage message.
* @return the Notice component with the fair usage message.
*/
export declare const FairUsageNotice: ({ variant }: FairUsageNoticeProps) => import("react/jsx-runtime").JSX.Element;
export {};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useFairUsageNoticeMessage from '../hooks/use-fair-usage-notice-message.js
* The fair usage notice component.
* @param {FairUsageNoticeProps} props - Fair usage notice component props.
* @param {FairUsageNoticeProps.variant} props.variant - The variant of the notice to render.
* @return {ReactElement} the Notice component with the fair usage message.
* @return the Notice component with the fair usage message.
*/
export const FairUsageNotice = ({ variant = 'error' }) => {
const useFairUsageNoticeMessageElement = useFairUsageNoticeMessage();
Expand Down
4 changes: 2 additions & 2 deletions build/ai-client/src/logo-generator/store/reducer.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AiFeatureStateProps, LogoGeneratorStateProp, RequestError } from './types.js';
import type { AiFeatureStateProps, RequestError } from './types.js';
import type { SiteDetails } from '../types.js';
/**
* Reducer for the Logo Generator store.
Expand Down Expand Up @@ -27,7 +27,7 @@ import type { SiteDetails } from '../types.js';
* @param {boolean} action.isLoadingHistory - Whether the history is being loaded
* @return {LogoGeneratorStateProp} The new state
*/
export default function reducer(state: LogoGeneratorStateProp, action: {
export default function reducer(state: import("./types.js").LogoGeneratorStateProp, action: {
type: string;
feature?: AiFeatureStateProps;
count?: number;
Expand Down
6 changes: 1 addition & 5 deletions src/logo-generator/components/fair-usage-notice.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Notice } from '@wordpress/components';
import useFairUsageNoticeMessage from '../hooks/use-fair-usage-notice-message.js';
/**
* Types
*/
import type { ReactElement } from 'react';

type FairUsageNoticeProps = {
variant?: 'error' | 'muted';
Expand All @@ -13,7 +9,7 @@ type FairUsageNoticeProps = {
* The fair usage notice component.
* @param {FairUsageNoticeProps} props - Fair usage notice component props.
* @param {FairUsageNoticeProps.variant} props.variant - The variant of the notice to render.
* @return {ReactElement} the Notice component with the fair usage message.
* @return the Notice component with the fair usage message.
*/
export const FairUsageNotice = ( { variant = 'error' }: FairUsageNoticeProps ) => {
const useFairUsageNoticeMessageElement = useFairUsageNoticeMessage();
Expand Down
7 changes: 1 addition & 6 deletions src/logo-generator/store/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ import {
ACTION_SET_IS_LOADING_HISTORY,
} from './constants.js';
import INITIAL_STATE from './initial-state.js';
import type {
AiFeatureStateProps,
LogoGeneratorStateProp,
RequestError,
TierLimitProp,
} from './types.js';
import type { AiFeatureStateProps, RequestError, TierLimitProp } from './types.js';
import type { SiteDetails } from '../types.js';

/**
Expand Down

0 comments on commit e0331d4

Please sign in to comment.