Skip to content

Commit b9e3dba

Browse files
committed
chore: fix eslint configuration
1 parent 0e2e176 commit b9e3dba

File tree

22 files changed

+82
-71
lines changed

22 files changed

+82
-71
lines changed

.eslintrc.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ module.exports = {
2626
'{}': false
2727
}
2828
}
29-
],
30-
'@typescript-eslint/member-ordering': [
31-
'error',
32-
{
33-
default: {
34-
order: 'alphabetically'
35-
}
36-
}
3729
]
3830
}
3931
};

apps/demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"eject": "expo eject",
99
"publish": "expo publish",
1010
"test": "jest --watchAll",
11-
"test:ts": "tsc --noEmit"
11+
"test:ts": "tsc --noEmit",
12+
"test:lint": "eslint --ext ts,tsx src/"
1213
},
1314
"jest": {
1415
"preset": "jest-expo"

apps/demo/src/components/UIColorPickerControlAtom.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Color from 'color';
33
import React, { ComponentType, useCallback, useEffect, useState } from 'react';
44
import { Dimensions, View } from 'react-native';
55
import { NativeViewGestureHandler } from 'react-native-gesture-handler';
6+
// eslint-disable-next-line @typescript-eslint/no-var-requires
67
const HsvColorPicker = require('react-native-hsv-color-picker')
78
.default as HsvColorPicker;
89
import { SelectorProps, PropsWithStyle } from './nucleons/types';

apps/demo/src/components/UINavResourceTide.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export default function UINavResourceTideMolecule<R extends ResourceRoute>({
2222
leftIconName={definition.iconName}
2323
title={definition.title}
2424
style={useSurfaceBackgroundStyleNucleon()}
25-
onPress={useCallback(() => navigation.navigate(route), [
26-
navigation,
27-
route
28-
])}
25+
onPress={useCallback(
26+
() => navigation.navigate(route),
27+
[navigation, route]
28+
)}
2929
/>
3030
);
3131
}

apps/demo/src/components/UINavTideMolecule.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ export default function UINavTideMolecule<R extends string>({
3333
<UITideAtom
3434
{...listProps}
3535
title={label}
36-
onPress={useCallback(() => navigation.navigate(route), [
37-
navigation,
38-
route
39-
])}
36+
onPress={useCallback(
37+
() => navigation.navigate(route),
38+
[navigation, route]
39+
)}
4040
bottom={bottom}
4141
leftIconName={leftIconName}
4242
rightIconName="arrow-right"

apps/demo/src/components/UIRadioItemAtom.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ const UIRadioItemAtom = memo(function RadioItem<V extends string>({
3737
labelStyle?: StyleProp<TextStyle>;
3838
style?: StyleProp<ViewStyle>;
3939
}) {
40-
const onPress = useCallback(() => onSelectedValueChange(value), [
41-
value,
42-
onSelectedValueChange
43-
]);
40+
const onPress = useCallback(
41+
() => onSelectedValueChange(value),
42+
[value, onSelectedValueChange]
43+
);
4444
const selected = useContext(selectedRadioItemContextAtom) === value;
4545
const { pressable, selectable, surface } = useColorRoles();
4646
const color = selected

apps/demo/src/components/UISliderControlAtom.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import { useNuclearContentWidth } from './nucleons/useContentWidthContext';
66
import { useColorRoles } from '../theme/colorSystem';
77

88
const GestureSlider = Platform.select({
9-
android: (createNativeWrapper(Slider, {
9+
android: createNativeWrapper(Slider, {
1010
disallowInterruption: true,
1111
shouldActivateOnStart: true,
1212
shouldCancelWhenOutside: false
13-
}) as unknown) as typeof Slider,
13+
}) as unknown as typeof Slider,
1414
default: Slider
1515
});
1616

apps/demo/src/components/UISourceDisplayMolecule.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ export default function UISourceDisplayMolecule({
4141
role: textRole
4242
});
4343
const syntheticPaddingVertical = useSpacing(paddingVertical ?? 0);
44-
const lineNumberDisplayWidthComputer: HighlighterProps['lineNumberDisplayWidthComputer'] = useCallback(
45-
(fs, maxLineNumberCharLength) => spacing + fs * maxLineNumberCharLength,
46-
[spacing]
47-
);
44+
const lineNumberDisplayWidthComputer: HighlighterProps['lineNumberDisplayWidthComputer'] =
45+
useCallback(
46+
(fs, maxLineNumberCharLength) => spacing + fs * maxLineNumberCharLength,
47+
[spacing]
48+
);
4849
return (
4950
<Highlighter
5051
{...otherProps}

apps/demo/src/components/nucleons/useTextRoleNucleon.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/ban-ts-comment */
12
import { TextStyle } from 'react-native';
23
import { useColorRoles } from '../../theme/colorSystem';
34

@@ -86,11 +87,11 @@ const roleDefs: Record<
8687
uiMono: { fontSize: BASE_FONT_SIZE * 0.9, fontFamily: FONT_MONO },
8788
uiHyperlink: { fontSize: 5, fontFamily: FONT_MONO },
8889
footer: { fontSize: BASE_FONT_SIZE * 0.8, fontFamily: FONT_MONO },
89-
//@ts-expect-error
90+
//@ts-ignore
9091
html: { fontSize: BASE_FONT_SIZE * 0.9 },
91-
//@ts-expect-error
92+
//@ts-ignore
9293
bodyInlineCode: { fontFamily: FONT_MONO },
93-
//@ts-expect-error
94+
//@ts-ignore
9495
bodyAPIRef: { fontFamily: FONT_MONO },
9596
sectionOutline: {
9697
fontSize: BASE_FONT_SIZE * 0.8,

apps/demo/src/components/screens/HomeDrawerScreen/VersionDisplay.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import * as React from 'react';
33
import { View } from 'react-native';
44
import { useSafeAreaInsets } from 'react-native-safe-area-context';
5+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
56
// @ts-ignore
67
import version from '../../../../version';
78
import TextRoleNucleon from '../../nucleons/TextRoleNucleon';

0 commit comments

Comments
 (0)