An ATproto social media client -- with an independent Appview.

more prettier and lint cleanup (#82)

* more prettier and lint cleanup

* Fixes more lint issues

* lint

* ignore more files

* remove todos

* lint

authored by

Aryan Goharzad and committed by
GitHub
3a90114f 9027882f

+18 -25
+7 -1
.eslintrc.js
··· 3 extends: '@react-native-community', 4 parser: '@typescript-eslint/parser', 5 plugins: ['@typescript-eslint'], 6 - ignorePatterns: ['**/__mocks__/*.ts', 'src/third-party', 'ios', 'android'], 7 overrides: [ 8 { 9 files: ['*.js', '*.mjs', '*.ts', '*.tsx'],
··· 3 extends: '@react-native-community', 4 parser: '@typescript-eslint/parser', 5 plugins: ['@typescript-eslint'], 6 + ignorePatterns: [ 7 + '**/__mocks__/*.ts', 8 + 'src/third-party', 9 + 'ios', 10 + 'android', 11 + 'coverage', 12 + ], 13 overrides: [ 14 { 15 files: ['*.js', '*.mjs', '*.ts', '*.tsx'],
+1 -1
.github/workflows/lint.yml
··· 30 - name: Yarn install 31 run: yarn 32 - name: Run tests 33 - run: | 34 yarn test --forceExit
··· 30 - name: Yarn install 31 run: yarn 32 - name: Run tests 33 + run: | 34 yarn test --forceExit
+5
.prettierignore
···
··· 1 + ios 2 + android 3 + src/third-party 4 + src/app.json 5 + public
+1 -7
src/state/lib/api.ts
··· 14 import {RootStoreModel} from '../models/root-store' 15 import {extractEntities} from '../../lib/strings' 16 import {isNetworkError} from '../../lib/errors' 17 - import {downloadAndResize} from '../../lib/images' 18 - import { 19 - getLikelyType, 20 - LikelyType, 21 - getLinkMeta, 22 - LinkMeta, 23 - } from '../../lib/link-meta' 24 import {Image} from '../../lib/images' 25 26 const TIMEOUT = 10e3 // 10s
··· 14 import {RootStoreModel} from '../models/root-store' 15 import {extractEntities} from '../../lib/strings' 16 import {isNetworkError} from '../../lib/errors' 17 + import {LinkMeta} from '../../lib/link-meta' 18 import {Image} from '../../lib/images' 19 20 const TIMEOUT = 10e3 // 10s
-1
src/view/com/composer/Autocomplete.tsx
··· 7 } from 'react-native' 8 import {useAnimatedValue} from '../../lib/hooks/useAnimatedValue' 9 import {Text} from '../util/text/Text' 10 - import {colors} from '../../lib/styles' 11 import {usePalette} from '../../lib/hooks/usePalette' 12 13 interface AutocompleteItem {
··· 7 } from 'react-native' 8 import {useAnimatedValue} from '../../lib/hooks/useAnimatedValue' 9 import {Text} from '../util/text/Text' 10 import {usePalette} from '../../lib/hooks/usePalette' 11 12 interface AutocompleteItem {
+1 -1
src/view/com/modals/ReportAccount.tsx
··· 20 21 export const snapPoints = ['50%'] 22 23 - export function Component({did}: {did: string}) { 24 const store = useStores() 25 const [isProcessing, setIsProcessing] = useState<boolean>(false) 26 const [error, setError] = useState<string>('')
··· 20 21 export const snapPoints = ['50%'] 22 23 + export function Component() { 24 const store = useStores() 25 const [isProcessing, setIsProcessing] = useState<boolean>(false) 26 const [error, setError] = useState<string>('')
+1 -1
src/view/com/modals/ReportPost.tsx
··· 21 22 export const snapPoints = ['50%'] 23 24 - export function Component({postUrl}: {postUrl: string}) { 25 const store = useStores() 26 const [isProcessing, setIsProcessing] = useState<boolean>(false) 27 const [error, setError] = useState<string>('')
··· 21 22 export const snapPoints = ['50%'] 23 24 + export function Component() { 25 const store = useStores() 26 const [isProcessing, setIsProcessing] = useState<boolean>(false) 27 const [error, setError] = useState<string>('')
+1 -7
src/view/com/modals/ServerInput.tsx
··· 14 15 export const snapPoints = ['80%'] 16 17 - export function Component({ 18 - initialService, 19 - onSelect, 20 - }: { 21 - initialService: string 22 - onSelect: (url: string) => void 23 - }) { 24 const store = useStores() 25 const [customUrl, setCustomUrl] = useState<string>('') 26
··· 14 15 export const snapPoints = ['80%'] 16 17 + export function Component({onSelect}: {onSelect: (url: string) => void}) { 18 const store = useStores() 19 const [customUrl, setCustomUrl] = useState<string>('') 20
-2
src/view/com/util/UserBanner.tsx
··· 11 } from 'react-native-image-crop-picker' 12 13 export function UserBanner({ 14 - handle, 15 banner, 16 onSelectNewBanner, 17 }: { 18 - handle: string 19 banner?: string | null 20 onSelectNewBanner?: (img: PickedImage) => void 21 }) {
··· 11 } from 'react-native-image-crop-picker' 12 13 export function UserBanner({ 14 banner, 15 onSelectNewBanner, 16 }: { 17 banner?: string | null 18 onSelectNewBanner?: (img: PickedImage) => void 19 }) {
-2
src/view/com/util/UserInfoText.tsx
··· 11 type = 'md', 12 did, 13 attr, 14 - loading, 15 failed, 16 prefix, 17 style, ··· 27 asLink?: boolean 28 }) { 29 attr = attr || 'handle' 30 - loading = loading || '...' 31 failed = failed || 'user' 32 33 const store = useStores()
··· 11 type = 'md', 12 did, 13 attr, 14 failed, 15 prefix, 16 style, ··· 26 asLink?: boolean 27 }) { 28 attr = attr || 'handle' 29 failed = failed || 'user' 30 31 const store = useStores()
+1 -1
src/view/screens/Contacts.tsx
··· 9 import {useStores} from '../../state' 10 import {useAnimatedValue} from '../lib/hooks/useAnimatedValue' 11 12 - export const Contacts = ({navIdx, visible, params}: ScreenParams) => { 13 const store = useStores() 14 const selectorInterp = useAnimatedValue(0) 15
··· 9 import {useStores} from '../../state' 10 import {useAnimatedValue} from '../lib/hooks/useAnimatedValue' 11 12 + export const Contacts = ({navIdx, visible}: ScreenParams) => { 13 const store = useStores() 14 const selectorInterp = useAnimatedValue(0) 15
-1
src/view/shell/mobile/index.tsx
··· 125 const scrollElRef = useRef<FlatList | undefined>() 126 const winDim = useWindowDimensions() 127 const [menuSwipingDirection, setMenuSwipingDirection] = useState(0) 128 - const constZeroInterp = useAnimatedValue(0) 129 const swipeGestureInterp = useAnimatedValue(0) 130 const minimalShellInterp = useAnimatedValue(0) 131 const tabMenuInterp = useAnimatedValue(0)
··· 125 const scrollElRef = useRef<FlatList | undefined>() 126 const winDim = useWindowDimensions() 127 const [menuSwipingDirection, setMenuSwipingDirection] = useState(0) 128 const swipeGestureInterp = useAnimatedValue(0) 129 const minimalShellInterp = useAnimatedValue(0) 130 const tabMenuInterp = useAnimatedValue(0)