Skip to content

Commit 25a2a30

Browse files
authored
Fix lint job on CI (#6921)
* Fix lint job on CI
1 parent 33e8655 commit 25a2a30

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ jobs:
291291
node --loader ./scripts/esm-support/loader.mjs ./scripts/esm-support/testESM.mjs
292292
293293
lint:
294-
executor: rsp
294+
executor: rsp-xlarge
295295
steps:
296296
- restore_cache:
297297
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build": "make build",
3636
"test:ssr": "cross-env STRICT_MODE=1 yarn jest --config jest.ssr.config.js",
3737
"ci-test": "cross-env STRICT_MODE=1 yarn jest --maxWorkers=2 && cross-env STRICT_MODE=1 yarn test:ssr --runInBand",
38-
"lint": "yarn check-types & eslint packages --ext .js,.ts,.tsx & yarn constraints & node scripts/lint-packages.js",
38+
"lint": "concurrently \"yarn check-types\" \"eslint packages --ext .js,.ts,.tsx\" \"node scripts/lint-packages.js\" \"yarn constraints\"",
3939
"jest": "node scripts/jest.js",
4040
"copyrights": "babel-node --presets @babel/env ./scripts/addHeaders.js",
4141
"build:icons": "babel-node --presets @babel/env ./scripts/buildIcons.js",

packages/@react-spectrum/s2/src/AvatarGroup.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';
1414
import {AvatarContext} from './Avatar';
15-
import {ContextValue} from 'react-aria-components';
15+
import {ContextValue, SlotProps} from 'react-aria-components';
1616
import {createContext, CSSProperties, forwardRef, ReactNode} from 'react';
1717
import {filterDOMProps} from '@react-aria/utils';
1818
import {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};
@@ -21,7 +21,7 @@ import {useDOMRef} from '@react-spectrum/utils';
2121
import {useLabel} from 'react-aria';
2222
import {useSpectrumContextProps} from './useSpectrumContextProps';
2323

24-
export interface AvatarGroupProps extends UnsafeStyles, DOMProps, AriaLabelingProps {
24+
export interface AvatarGroupProps extends UnsafeStyles, DOMProps, AriaLabelingProps, SlotProps {
2525
/** Avatar children of the avatar group. */
2626
children: ReactNode,
2727
/** The label for the avatar group. */

packages/@react-spectrum/s2/src/Badge.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
2525
export interface BadgeStyleProps {
2626
/**
2727
* The size of the badge.
28-
*
28+
*
2929
* @default 'S'
3030
*/
3131
size?: 'S' | 'M' | 'L' | 'XL',
3232
/**
3333
* The variant changes the background color of the badge. When badge has a semantic meaning, they should use the variant for semantic colors.
34-
*
34+
*
3535
* @default 'neutral'
3636
*/
3737
variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'charteuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver',
@@ -169,7 +169,7 @@ const badge = style<BadgeStyleProps>({
169169
neutral: 'gray-700',
170170
positive: 'positive-700',
171171
notice: 'notice-700',
172-
negative: 'negative-800',
172+
negative: 'negative-800'
173173
}
174174
}
175175
}

packages/@react-spectrum/s2/src/Tabs.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ import {
1515
TabPanel as AriaTabPanel,
1616
TabPanelProps as AriaTabPanelProps,
1717
TabProps as AriaTabProps,
18-
TabsProps as AriaTabsProps,
18+
TabsProps as AriaTabsProps,
1919
ContextValue,
2020
Provider,
2121
Tab as RACTab,
2222
TabList as RACTabList,
2323
Tabs as RACTabs,
2424
TabListStateContext,
25-
useSlottedContext} from 'react-aria-components';
25+
useSlottedContext
26+
} from 'react-aria-components';
2627
import {centerBaseline} from './CenterBaseline';
2728
import {Collection, DOMRef, DOMRefValue, Key, Node, Orientation} from '@react-types/shared';
2829
import {createContext, forwardRef, ReactNode, useCallback, useContext, useEffect, useRef, useState} from 'react';
@@ -57,7 +58,7 @@ export interface TabListProps<T> extends Omit<AriaTabListProps<T>, 'children' |
5758
children?: ReactNode
5859
}
5960

60-
export interface TabPanelProps extends Omit<AriaTabPanelProps, 'children' | 'style' | 'className'>, UnsafeStyles {
61+
export interface TabPanelProps extends Omit<AriaTabPanelProps, 'children' | 'style' | 'className'>, UnsafeStyles {
6162
/** Spectrum-defined styles, returned by the `style()` macro. */
6263
styles?: StylesPropWithHeight,
6364
/** The content to display in the tab panels. */
@@ -121,7 +122,7 @@ const icon = style({
121122
});
122123

123124
export function Tab(props: TabProps) {
124-
let {density} = useSlottedContext(TabsContext);
125+
let {density} = useSlottedContext(TabsContext) ?? {};
125126

126127
return (
127128
<RACTab
@@ -174,7 +175,7 @@ const tablist = style({
174175
});
175176

176177
export function TabList<T extends object>(props: TabListProps<T>) {
177-
let {density, isDisabled, disabledKeys, orientation} = useSlottedContext(TabsContext);
178+
let {density, isDisabled, disabledKeys, orientation} = useSlottedContext(TabsContext) ?? {};
178179
let state = useContext(TabListStateContext);
179180
let [selectedTab, setSelectedTab] = useState<HTMLElement | undefined>(undefined);
180181
let tablistRef = useRef<HTMLDivElement>(null);

packages/@react-spectrum/s2/src/bar-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const bar = () => ({
2525
labelPosition: {
2626
top: [
2727
'label value',
28-
'bar bar',
28+
'bar bar'
2929
],
3030
side: [
3131
'label bar value'

packages/react-aria-components/src/FieldError.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212

13-
import {DOMProps, ValidationResult} from "@react-types/shared";
14-
import {filterDOMProps} from "@react-aria/utils";
13+
import {DOMProps, ValidationResult} from '@react-types/shared';
14+
import {filterDOMProps} from '@react-aria/utils';
1515
import React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';
1616
import {RenderProps, useRenderProps} from './utils';
1717
import {Text} from './Text';

0 commit comments

Comments
 (0)