Skip to content

Commit 906bc87

Browse files
chore: migrate to pnpm
1 parent 039c8eb commit 906bc87

20 files changed

+5458
-8129
lines changed

.eslintrc.json

-40
This file was deleted.

.github/workflows/ci.yaml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: React Native CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [23.x]
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
run_install: false
23+
24+
- name: Get pnpm store directory
25+
shell: bash
26+
run: |
27+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
28+
29+
- name: Use Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
34+
- name: Setup pnpm cache
35+
uses: actions/cache@v4
36+
with:
37+
path: ${{ env.STORE_PATH }}
38+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pnpm-store-
41+
42+
- name: Install Dependencies
43+
run: pnpm install
44+
45+
- name: Run Linter
46+
run: pnpm lint
47+
48+
test:
49+
needs: lint
50+
runs-on: ubuntu-latest
51+
52+
strategy:
53+
matrix:
54+
node-version: [23.x]
55+
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v4
59+
60+
- name: Setup pnpm
61+
uses: pnpm/action-setup@v4
62+
with:
63+
run_install: false
64+
65+
- name: Get pnpm store directory
66+
shell: bash
67+
run: |
68+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
69+
70+
- name: Use Node.js ${{ matrix.node-version }}
71+
uses: actions/setup-node@v4
72+
with:
73+
node-version: ${{ matrix.node-version }}
74+
75+
- name: Setup pnpm cache
76+
uses: actions/cache@v4
77+
with:
78+
path: ${{ env.STORE_PATH }}
79+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
80+
restore-keys: |
81+
${{ runner.os }}-pnpm-store-
82+
83+
- name: Install Dependencies
84+
run: pnpm install
85+
86+
- name: Run Tests
87+
run: pnpm test:ci

.github/workflows/tests.yaml

-37
This file was deleted.

.husky/.gitignore

-1
This file was deleted.

.husky/commit-msg

100755100644
+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
. "$(dirname "$0")/common.sh"
4-
5-
yarn commitlint --edit $1
1+
pnpm commitlint --edit

.husky/common.sh

-8
This file was deleted.

.husky/pre-commit

100755100644
+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
. "$(dirname "$0")/common.sh"
4-
5-
yarn lint-staged
1+
pnpm lint-staged

.husky/pre-push

100755100644
+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
yarn test:ci
1+
pnpm test:ci

.husky/prepare-commit-msg

100755100644
+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
. "$(dirname "$0")/common.sh"
4-
5-
exec < /dev/tty && yarn cz --hook || true
1+
exec < /dev/tty && pnpm cz --hook || true

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

-541
This file was deleted.

.yarn/releases/yarn-3.6.3.cjs

-874
This file was deleted.

.yarnrc.yml

-7
This file was deleted.

config/eslint/import-order.config.mjs

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
export const importOrderConfig = [
2+
'error',
3+
{
4+
'newlines-between': 'always',
5+
groups: [
6+
'builtin',
7+
'external',
8+
'internal',
9+
'parent',
10+
'sibling',
11+
'index',
12+
'object',
13+
'type',
14+
],
15+
alphabetize: {
16+
order: 'asc',
17+
caseInsensitive: true,
18+
},
19+
pathGroups: [
20+
{
21+
pattern: '@/features/**',
22+
group: 'internal',
23+
position: 'before',
24+
},
25+
{
26+
pattern: '@/controllers/**',
27+
group: 'internal',
28+
position: 'before',
29+
},
30+
{
31+
pattern: '@/services/**',
32+
group: 'internal',
33+
position: 'after',
34+
},
35+
{
36+
pattern: '@/libs/**',
37+
group: 'internal',
38+
position: 'before',
39+
},
40+
{
41+
pattern: '@/interfaces/**',
42+
group: 'internal',
43+
position: 'before',
44+
},
45+
{
46+
pattern: '@/utils/**',
47+
group: 'internal',
48+
position: 'before',
49+
},
50+
{
51+
pattern: '@/config/**',
52+
group: 'internal',
53+
position: 'before',
54+
},
55+
{
56+
pattern: '@/events/**',
57+
group: 'internal',
58+
position: 'before',
59+
},
60+
],
61+
pathGroupsExcludedImportTypes: ['builtin'],
62+
},
63+
];
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export const typescriptRules = {
2+
'prettier/prettier': 'error',
3+
'no-undef': 'off',
4+
'no-unused-vars': 'off',
5+
'array-bracket-spacing': 'warn',
6+
'react/prop-types': 'off',
7+
'react/function-component-definition': 'off',
8+
'@typescript-eslint/no-unused-vars': [
9+
'warn',
10+
{
11+
argsIgnorePattern: '^_',
12+
varsIgnorePattern: '^_',
13+
},
14+
],
15+
'@typescript-eslint/no-explicit-any': 'warn',
16+
'@typescript-eslint/explicit-function-return-type': 'off',
17+
'@typescript-eslint/explicit-module-boundary-types': 'off',
18+
'@typescript-eslint/no-non-null-assertion': 'warn',
19+
};

eslint.config.mjs

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import eslintRecommended from '@eslint/js';
2+
import typeScriptEslintPlugin from '@typescript-eslint/eslint-plugin';
3+
import typescriptParser from '@typescript-eslint/parser';
4+
import eslintConfigPrettier from 'eslint-config-prettier';
5+
import eslintImportPlugin from 'eslint-plugin-import';
6+
import prettierPlugin from 'eslint-plugin-prettier';
7+
import globals from 'globals';
8+
9+
import { importOrderConfig } from './config/eslint/import-order.config.mjs';
10+
import { typescriptRules } from './config/eslint/typescript-rules.config.mjs';
11+
12+
export default [
13+
eslintRecommended.configs.recommended,
14+
eslintConfigPrettier,
15+
{
16+
files: ['**/*.{ts,tsx}'],
17+
languageOptions: {
18+
ecmaVersion: 'latest',
19+
sourceType: 'module',
20+
parser: typescriptParser,
21+
parserOptions: {
22+
project: './tsconfig.json',
23+
ecmaFeatures: {
24+
jsx: true,
25+
},
26+
},
27+
globals: {
28+
...globals.browser,
29+
...globals.node,
30+
...globals.jest,
31+
},
32+
},
33+
plugins: {
34+
'@typescript-eslint': typeScriptEslintPlugin,
35+
import: eslintImportPlugin,
36+
prettier: prettierPlugin,
37+
},
38+
settings: {
39+
'import/resolver': {
40+
typescript: {
41+
project: './tsconfig.json',
42+
},
43+
},
44+
},
45+
rules: {
46+
...typescriptRules,
47+
'import/order': importOrderConfig,
48+
},
49+
},
50+
{
51+
ignores: [
52+
'node_modules/**',
53+
'dist/**',
54+
'build/**',
55+
'coverage/**',
56+
'*.config.{js,ts,mjs}',
57+
'.next/**',
58+
],
59+
},
60+
];

0 commit comments

Comments
 (0)