Skip to content

Commit

Permalink
linting fixes and gradlew revert
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecurtis committed Dec 1, 2023
1 parent 72c8302 commit 869e25b
Show file tree
Hide file tree
Showing 9 changed files with 25,507 additions and 17,972 deletions.
2 changes: 1 addition & 1 deletion android/gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash

##############################################################################
##
Expand Down
1 change: 1 addition & 0 deletions lib/bpk-appearance/src/BpkAppearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const appearance = {
addChangeListener: (listener: (BpkAppearancePreferences) => void) => {
Appearance.addChangeListener(listener);
},
// eslint-disable-next-line no-unused-vars
removeChangeListener: (listener: (BpkAppearancePreferences) => void) => {
// Appearance.addChangeListener(listener).remove();
},
Expand Down
1 change: 1 addition & 0 deletions lib/bpk-appearance/src/BpkAppearanceConsumer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jest.mock('react-native/Libraries/Utilities/Appearance', () => ({
removeChangeListener: jest.fn(),
}));

// eslint-disable-next-line react/prop-types
const TestComponent = ({ bpkAppearance }) => {
TestComponent.currentAppearance = bpkAppearance;
return null;
Expand Down
1 change: 1 addition & 0 deletions lib/bpk-appearance/src/hooks-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jest.mock('react-native/Libraries/Utilities/Appearance', () => ({
removeChangeListener: jest.fn(),
}));

// eslint-disable-next-line react/prop-types
const TestComponent = ({ hook }) => {
TestComponent.currentValue = hook();
return null;
Expand Down
2 changes: 1 addition & 1 deletion lib/bpk-component-banner-alert/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class BpkBannerAlertFadeDemo extends Component<
<View>
{[...Array(this.state.bannerAlertCount)].map((e, i) => (
<DismissableBannerAlert
key={i.toString()}
key={i.toString()} // eslint-disable-line react/no-array-index-key
bannerStyle={this.props.bannerStyle}
message={this.props.message}
type={this.props.type}
Expand Down
17 changes: 8 additions & 9 deletions lib/bpk-component-carousel-indicator/src/BpkCarouselIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,14 @@ const transitionGroupSorter = (children) =>
const BpkCarouselIndicator = (props: Props) => {
const { pageCount, selectedIndex, style, ...rest } = props;

const indicators = new Array(pageCount)
.fill()
.map((_, index) => (
<BpkCarouselIndicatorDot
key={index.toString()}
selected={selectedIndex === index}
size={getIndicatorSize(pageCount, index, selectedIndex)}
/>
));
const indicators = new Array(pageCount).fill().map((_, index) => (
<BpkCarouselIndicatorDot
// eslint-disable-next-line react/no-array-index-key
key={index.toString()}
selected={selectedIndex === index}
size={getIndicatorSize(pageCount, index, selectedIndex)}
/>
));

const { begin, end } = getIndicatorSlice(pageCount, selectedIndex);

Expand Down
3 changes: 3 additions & 0 deletions lib/bpk-component-carousel-indicator/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ storiesOf('bpk-component-carousel-indicator', module)
.add('docs:default', () => (
<View>
{new Array(5).fill().map((_, index) => (
// eslint-disable-next-line react/no-array-index-key
<View key={index.toString()} style={styles.storyInstance}>
<StorySubheading>
{index + 1} page{index === 0 ? '' : 's'}
Expand All @@ -161,6 +162,7 @@ storiesOf('bpk-component-carousel-indicator', module)
</StorySubheading>
{new Array(6).fill().map((_, index) => (
<BpkCarouselIndicator
// eslint-disable-next-line react/no-array-index-key
key={index.toString()}
pageCount={6}
selectedIndex={index}
Expand All @@ -174,6 +176,7 @@ storiesOf('bpk-component-carousel-indicator', module)
<View>
{new Array(6).fill().map((_, index) => (
<View
// eslint-disable-next-line react/no-array-index-key
key={index.toString()}
style={[styles.colorBlock, { backgroundColor: pageColors[index] }]}
>
Expand Down
1 change: 1 addition & 0 deletions lib/bpk-component-horizontal-nav/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const StoryNav = (props) => {
title="Item"
small={small}
id={index.toString()}
// eslint-disable-next-line react/no-array-index-key
key={index.toString()}
onPress={action(`Nav item ${index} pressed`)}
/>
Expand Down
Loading

0 comments on commit 869e25b

Please sign in to comment.