Skip to content

Commit

Permalink
Add .prettierrc
Browse files Browse the repository at this point in the history
  • Loading branch information
youzarsiph committed Apr 17, 2024
1 parent 86badc8 commit fb774b0
Show file tree
Hide file tree
Showing 37 changed files with 1,361 additions and 1,318 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
root: true,
extends: ["universe/native"],
extends: ['universe/native'],
rules: {
// Ensures props and state inside functions are always up-to-date
"react-hooks/exhaustive-deps": "warn",
'react-hooks/exhaustive-deps': 'warn',
},
};
}
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
branches: ["main"]
branches: ['main']
schedule:
- cron: "23 19 * * 0"
- cron: '23 19 * * 0'

jobs:
analyze:
Expand Down Expand Up @@ -86,4 +86,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
category: '/language:${{matrix.language}}'
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ name: ESLint

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: ['main']

jobs:
eslint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ name: Prettier

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: ['main']

jobs:
eslint:
Expand Down
37 changes: 36 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# dependencies
node_modules/
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"singleQuote": true,
"endOfLine": "auto"
}
32 changes: 16 additions & 16 deletions app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { MaterialCommunityIcons } from "@expo/vector-icons";
import { Tabs, router } from "expo-router";
import React from "react";
import { Appbar, Tooltip } from "react-native-paper";
import { MaterialCommunityIcons } from '@expo/vector-icons'
import { Tabs, router } from 'expo-router'
import React from 'react'
import { Appbar, Tooltip } from 'react-native-paper'

import { TabBar, TabsHeader } from "@/components";
import Locales from "@/locales";
import { TabBar, TabsHeader } from '@/components'
import Locales from '@/locales'

const TabLayout = () => (
<Tabs
Expand All @@ -17,32 +17,32 @@ const TabLayout = () => (
<Tabs.Screen
name="index"
options={{
title: Locales.t("titleHome"),
title: Locales.t('titleHome'),
tabBarIcon: (props) => (
<MaterialCommunityIcons
{...props}
size={24}
name={props.focused ? "home" : "home-outline"}
name={props.focused ? 'home' : 'home-outline'}
/>
),
}}
/>
<Tabs.Screen
name="settings"
options={{
title: Locales.t("titleSettings"),
title: Locales.t('titleSettings'),
headerRight: () => (
<>
<Tooltip title={Locales.t("stackNav")}>
<Tooltip title={Locales.t('stackNav')}>
<Appbar.Action
icon="card-multiple-outline"
onPress={() => router.push("/modal")}
onPress={() => router.push('/modal')}
/>
</Tooltip>
<Tooltip title={Locales.t("drawerNav")}>
<Tooltip title={Locales.t('drawerNav')}>
<Appbar.Action
icon="gesture-swipe"
onPress={() => router.push("/drawer/")}
onPress={() => router.push('/drawer/')}
/>
</Tooltip>
</>
Expand All @@ -51,12 +51,12 @@ const TabLayout = () => (
<MaterialCommunityIcons
{...props}
size={24}
name={props.focused ? "cog" : "cog-outline"}
name={props.focused ? 'cog' : 'cog-outline'}
/>
),
}}
/>
</Tabs>
);
)

export default TabLayout;
export default TabLayout
24 changes: 12 additions & 12 deletions app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import React from "react";
import { Chip, Divider, Surface, Text } from "react-native-paper";
import React from 'react'
import { Chip, Divider, Surface, Text } from 'react-native-paper'

import Locales from "@/locales";
import Locales from '@/locales'

const TabsHome = () => (
<Surface
style={{
flex: 1,
gap: 16,
padding: 32,
alignItems: "center",
justifyContent: "center",
alignItems: 'center',
justifyContent: 'center',
}}
>
<Text variant="displaySmall">{Locales.t("titleHome")}</Text>
<Text variant="displaySmall">{Locales.t('titleHome')}</Text>

<Divider />

<Text variant="bodyLarge">{Locales.t("openScreenCode")}</Text>
<Text variant="bodyLarge">{Locales.t('openScreenCode')}</Text>

<Chip textStyle={{ fontFamily: "JetBrainsMono_400Regular" }}>
<Chip textStyle={{ fontFamily: 'JetBrainsMono_400Regular' }}>
app/(tabs)/index.tsx
</Chip>

<Text variant="bodyLarge" style={{ textAlign: "center" }}>
{Locales.t("changeScreenCode")}
<Text variant="bodyLarge" style={{ textAlign: 'center' }}>
{Locales.t('changeScreenCode')}
</Text>
</Surface>
);
)

export default TabsHome;
export default TabsHome
Loading

0 comments on commit fb774b0

Please sign in to comment.