Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Prettier Code Formatter

on:
push:
branches:
- new/prettier-configuration

jobs:
prettier:
name: Run Prettier on Push
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: npm install

- name: Run Prettier Check
run: npm run format-check
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
build
dist
package-lock.json
yarn.lock
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ Bem-vindo ao Frontend da LumiCheck!
## Como Visualizar o Projeto

### 1. No Telemóvel (Smartphone)

- Após rodar `npm start`, um QR Code vai aparecer no terminal.
- Dá Scan do QR Code no app Expo Go.

### 2. No Android Studio

- Quando `npm start` é executado, podes clicar no 'a' para abrir o simulador de smartphone do Android Studio.
- Isto só funciona se já o tiveres instalado e configurado com o SDK correto.


> **Nota:** Sempre que se fizer alterações no código, tem de se atualizar manualmente o app no telemóvel (clicando na tecla 'r' no terminal).

---

Alguma dúvida não hesite em contactar algum dos desenvolvedores.

10 changes: 3 additions & 7 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"ios": {
"supportsTablet": true,
"infoPlist": {
"UIBackgroundModes": [
"remote-notification"
],
"UIBackgroundModes": ["remote-notification"],
"NSUserTrackingUsageDescription": "Este app utiliza notificações para manter você informado sobre atualizações importantes.",
"UIUserNotificationSettings": {
"UIUserNotificationTypeAlert": true,
Expand All @@ -36,8 +34,6 @@
"favicon": "./assets/lumis/Lumi4k.png",
"bundler": "metro"
},
"plugins": [
"expo-font"
]
"plugins": ["expo-font"]
}
}
}
16 changes: 8 additions & 8 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = function (api) {
api.cache(true);
return {
presets: [
["babel-preset-expo", { jsxImportSource: "nativewind" }],
"nativewind/babel",
],
};
};
api.cache(true);
return {
presets: [
['babel-preset-expo', { jsxImportSource: 'nativewind' }],
'nativewind/babel',
],
};
};
14 changes: 7 additions & 7 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const { getDefaultConfig } = require("expo/metro-config");
const { withNativeWind } = require("nativewind/metro");
const { getDefaultConfig } = require('expo/metro-config');
const { withNativeWind } = require('nativewind/metro');

const config = getDefaultConfig(__dirname);

// Ajustar os resolvers para lidar com arquivos SVG
const { assetExts, sourceExts } = config.resolver;
config.resolver.assetExts = assetExts.filter((ext) => ext !== "svg");
config.resolver.sourceExts = [...sourceExts, "svg"];
config.resolver.assetExts = assetExts.filter((ext) => ext !== 'svg');
config.resolver.sourceExts = [...sourceExts, 'svg'];

// Adicionar suporte ao react-native-svg-transformer
config.transformer = {
...config.transformer,
babelTransformerPath: require.resolve("react-native-svg-transformer"),
...config.transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer'),
};

// Integrar com NativeWind
module.exports = withNativeWind(config, { input: "./src/index.css" });
module.exports = withNativeWind(config, { input: './src/index.css' });
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
"web": "expo start --web",
"format": "prettier --write .",
"format-check": "prettier --check ."
},
"dependencies": {
"@expo-google-fonts/quicksand": "^0.2.3",
Expand All @@ -23,6 +25,7 @@
"expo-image-picker": "~16.0.4",
"expo-linear-gradient": "~14.0.2",
"expo-location": "~18.0.5",
"expo-notifications": "~0.29.12",
"expo-splash-screen": "~0.29.20",
"expo-status-bar": "~2.0.1",
"nativewind": "^4.1.23",
Expand All @@ -39,13 +42,13 @@
"react-native-svg": "^15.8.0",
"react-native-svg-transformer": "^1.5.0",
"react-native-vector-icons": "^10.2.0",
"react-native-web": "~0.19.13",
"expo-notifications": "~0.29.12"
"react-native-web": "~0.19.13"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"prettier": "^3.5.3",
"tailwindcss": "^3.4.17"
},
"private": true
Expand Down
Loading