Skip to content

Commit cc91d8f

Browse files
committed
feat: add CI workflow, enhance ESLint config, and update VSCode settings and extensions
1 parent 15f93fe commit cc91d8f

File tree

28 files changed

+399
-80
lines changed

28 files changed

+399
-80
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
jobs:
9+
test-and-lint:
10+
name: Test, Lint & Typecheck
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run TypeScript type checking
27+
run: npm run typecheck
28+
29+
- name: Run ESLint
30+
run: npm run lint
31+
32+
- name: Run tests
33+
run: npm test -- --watchAll=false --coverage

.vscode/extensions.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
{ "recommendations": ["expo.vscode-expo-tools"] }
1+
{
2+
"recommendations": [
3+
"expo.vscode-expo-tools",
4+
"dbaeumer.vscode-eslint",
5+
"esbenp.prettier-vscode",
6+
"yoavbls.pretty-ts-errors",
7+
"mikestead.dotenv",
8+
"eamodio.gitlens",
9+
"streetsidesoftware.code-spell-checker",
10+
"formulahendry.auto-close-tag",
11+
"formulahendry.auto-rename-tag",
12+
"lokalise.i18n-ally",
13+
"ChakrounAnas.turbo-console-log"
14+
]
15+
}

.vscode/settings.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@
44
"source.organizeImports": "explicit",
55
"source.sortMembers": "explicit"
66
},
7-
"i18n-ally.localesPaths": [
8-
"src/i18n"
9-
]
7+
"i18n-ally.localesPaths": ["src/i18n/data"],
8+
"editor.tabSize": 2,
9+
"editor.detectIndentation": false,
10+
"editor.defaultFormatter": "esbenp.prettier-vscode",
11+
"editor.formatOnSave": true,
12+
"typescript.tsdk": "node_modules/typescript/lib",
13+
"eslint.format.enable": true,
14+
"[javascript][typescript][typescriptreact]": {
15+
"editor.formatOnSave": true,
16+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
17+
"editor.codeActionsOnSave": ["source.fixAll.eslint"]
18+
},
19+
"[json][jsonc]": {
20+
"editor.formatOnSave": true,
21+
"editor.defaultFormatter": "esbenp.prettier-vscode"
22+
},
23+
"cSpell.words": ["Flashlist"]
1024
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To create a new project using this boilerplate template:
3737
4. **Configure environment**: Copy and configure your environment variables:
3838

3939
```bash
40-
cp .env.example .env
40+
cp .env.example .env.local
4141
```
4242

4343
5. **Initialize translations** (optional): If you plan to use internationalization:
@@ -59,7 +59,7 @@ To create a new project using this boilerplate template:
5959
2. Start the app
6060

6161
```bash
62-
npx expo start
62+
npm start
6363
```
6464

6565
In the output, you'll find options to open the app in a

eslint.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { defineConfig } from 'eslint/config';
2+
import expoConfig from 'eslint-config-expo/flat.js';
3+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4+
import testingLibrary from 'eslint-plugin-testing-library';
5+
import reactCompiler from 'eslint-plugin-react-compiler';
6+
7+
export default defineConfig([
8+
expoConfig,
9+
eslintPluginPrettierRecommended,
10+
reactCompiler.configs.recommended,
11+
{
12+
files: ['**/*.ts', '**/*.tsx'],
13+
rules: {
14+
'prettier/prettier': 'error',
15+
'no-console': 'warn',
16+
17+
'react-hooks/exhaustive-deps': 'warn',
18+
'react/display-name': 'off',
19+
'react/react-in-jsx-scope': 'off',
20+
21+
'import/no-default-export': 'error',
22+
'import/order': [
23+
'error',
24+
{
25+
groups: [
26+
['external', 'builtin'],
27+
['parent', 'internal'],
28+
['index', 'sibling'],
29+
],
30+
'newlines-between': 'always',
31+
},
32+
],
33+
'@typescript-eslint/no-explicit-any': 'error',
34+
'@typescript-eslint/explicit-function-return-type': 'off',
35+
'@typescript-eslint/no-empty-function': 'off',
36+
'@typescript-eslint/explicit-module-boundary-types': 'off',
37+
},
38+
},
39+
// Allow default exports for Expo Router files
40+
{
41+
files: ['src/app/**/*.ts', 'src/app/**/*.tsx'],
42+
rules: {
43+
'import/no-default-export': 'off',
44+
},
45+
},
46+
// Testing Library rules for test files
47+
{
48+
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
49+
plugins: { 'testing-library': testingLibrary },
50+
rules: {
51+
...testingLibrary.configs.react.rules,
52+
},
53+
},
54+
{
55+
ignores: ['dist/*'],
56+
},
57+
]);

0 commit comments

Comments
 (0)