diff --git a/.eslintrc.js b/.eslintrc.js index 40c6dcd..c5ec5e3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,8 @@ module.exports = { root: true, extends: '@react-native-community', + rules: { + 'react-native/no-inline-styles': 0, + radix: 0, + }, }; diff --git a/.prettierrc.js b/.prettierrc.js index 84196d9..c026d20 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,7 +1,8 @@ module.exports = { - bracketSpacing: false, + bracketSpacing: true, jsxBracketSameLine: true, singleQuote: true, trailingComma: 'all', arrowParens: 'avoid', + printWidth: 120, }; diff --git a/.watchmanconfig b/.watchmanconfig index 9e26dfe..0967ef4 100644 --- a/.watchmanconfig +++ b/.watchmanconfig @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/app.json b/app.json index 2aef187..bcfcb1d 100644 --- a/app.json +++ b/app.json @@ -1,4 +1,4 @@ { "name": "SubSonify", "displayName": "SubSonify" -} \ No newline at end of file +} diff --git a/ios/SubSonify/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/SubSonify/Images.xcassets/AppIcon.appiconset/Contents.json index 118c98f..48e64ae 100644 --- a/ios/SubSonify/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/SubSonify/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,38 +1,38 @@ { - "images" : [ + "images": [ { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "idiom": "iphone", + "size": "29x29", + "scale": "2x" }, { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "idiom": "iphone", + "size": "29x29", + "scale": "3x" }, { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "idiom": "iphone", + "size": "40x40", + "scale": "2x" }, { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "idiom": "iphone", + "size": "40x40", + "scale": "3x" }, { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "idiom": "iphone", + "size": "60x60", + "scale": "2x" }, { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "idiom": "iphone", + "size": "60x60", + "scale": "3x" } ], - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } -} \ No newline at end of file +} diff --git a/ios/SubSonify/Images.xcassets/Contents.json b/ios/SubSonify/Images.xcassets/Contents.json index 2d92bd5..97a8662 100644 --- a/ios/SubSonify/Images.xcassets/Contents.json +++ b/ios/SubSonify/Images.xcassets/Contents.json @@ -1,6 +1,6 @@ { - "info" : { - "version" : 1, - "author" : "xcode" + "info": { + "version": 1, + "author": "xcode" } } diff --git a/react-native.config.js b/react-native.config.js index 3d4e0f5..ef09f5b 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -3,5 +3,5 @@ module.exports = { ios: {}, android: {}, }, - assets: ['./assets/fonts'] + assets: ['./assets/fonts'], }; diff --git a/src/components/ArtistsList.tsx b/src/components/ArtistsList.tsx index 2d6eb52..8715682 100644 --- a/src/components/ArtistsList.tsx +++ b/src/components/ArtistsList.tsx @@ -4,31 +4,26 @@ import { useAtomValue } from 'jotai/utils'; import { Artist } from '../models/music'; import { artistsAtom } from '../state/music'; -const ArtistItem: React.FC<{ item: Artist } > = ({ item }) => ( +const ArtistItem: React.FC<{ item: Artist }> = ({ item }) => ( {item.id} - {item.name} + + {item.name} + ); const List = () => { const artists = useAtomValue(artistsAtom); - const renderItem: React.FC<{ item: Artist }> = ({ item }) => ( - - ); + const renderItem: React.FC<{ item: Artist }> = ({ item }) => ; - return ( - item.id} - /> - ); -} + return item.id} />; +}; const ArtistsList = () => ( @@ -36,6 +31,6 @@ const ArtistsList = () => ( -) +); export default ArtistsList; diff --git a/src/components/FocusableIcon.tsx b/src/components/FocusableIcon.tsx index 9705e5e..658add3 100644 --- a/src/components/FocusableIcon.tsx +++ b/src/components/FocusableIcon.tsx @@ -3,21 +3,21 @@ import { Image, ImageSourcePropType } from 'react-native'; import colors from '../styles/colors'; export type FocusableIconProps = { - focused: boolean, + focused: boolean; source: ImageSourcePropType; focusedSource?: ImageSourcePropType; width?: number; height?: number; }; -const FocusableIcon: React.FC = (props) => { +const FocusableIcon: React.FC = props => { props.focusedSource = props.focusedSource || props.source; props.width = props.width || 26; props.height = props.height || 26; return ( = (props) => { source={props.focused ? props.focusedSource : props.source} /> ); -} +}; export default FocusableIcon; diff --git a/src/components/NowPlayingLayout.tsx b/src/components/NowPlayingLayout.tsx index fc6648a..a03086f 100644 --- a/src/components/NowPlayingLayout.tsx +++ b/src/components/NowPlayingLayout.tsx @@ -1,96 +1,103 @@ import React from 'react'; -import { Image, StyleSheet, Text, View } from 'react-native'; +import { StyleSheet, Text, View } from 'react-native'; const NowPlayingLayout = () => { return ( - - - - {/* top bar */} - - - - + {/* top bar */} + + + + Playing from Your Library Songs - + - + - {/* album art */} - - - - + + + + - {/* song/album/artist title */} - - Name of the Song + + Name of the Song Cool Artist - {/* seek bar */} - - - + + - - + + 00:00 00:00 - + - {/* main player controls */} - + @@ -100,13 +107,13 @@ const NowPlayingLayout = () => { - {/* extra controls */} - + @@ -115,7 +122,7 @@ const NowPlayingLayout = () => { ); -} +}; const styles = StyleSheet.create({ text: { diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index cb39dc7..fb48a25 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -14,21 +14,15 @@ const TestControls = () => { const removeAllKeys = async () => { const allKeys = await getAllKeys(); await multiRemove(allKeys); - } + }; return ( -