Skip to content

Commit 381b731

Browse files
committed
feat(project): update template, cleanup eslint and disable minification
Minification not necessary for React Native plugins published to npm, will be bundled again anyways. release-npm
1 parent bd4c08d commit 381b731

File tree

3 files changed

+21
-36
lines changed

3 files changed

+21
-36
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Starting point for creating React Native plugins in TypeScript without native co
1111

1212
## Usage
1313

14-
> :warning: **node**: Requires at least node version 16.
15-
1614
```
1715
npm init -y react-native-plugin@latest react-native-my-plugin
1816
# or

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"source": true
1010
},
1111
"dependencies": {
12-
"change-case": "4.1.2"
12+
"change-case": "5.2.0"
13+
},
14+
"devDependencies": {
15+
"padua": "^2.0.7"
1316
},
1417
"type": "module",
1518
"bin": "index.js",
@@ -24,9 +27,6 @@
2427
"plugin",
2528
"template"
2629
],
27-
"devDependencies": {
28-
"padua": "^1.3.1"
29-
},
3030
"prettier": "padua/configuration/.prettierrc.json",
3131
"eslintConfig": {
3232
"extends": "./node_modules/padua/configuration/eslint.cjs",
@@ -41,6 +41,6 @@
4141
"provenance": true
4242
},
4343
"engines": {
44-
"node": ">= 16"
44+
"node": ">= 18"
4545
}
4646
}

template/package.json

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"app": "node create-app.js",
1717
"app:install": "npm i --no-save $(npm pack . | tail -1) --prefix app",
18-
"build": "esbuild index.tsx --outdir=dist --bundle --minify --format=esm --sourcemap --external:react-native --external:react && tsc",
18+
"build": "esbuild index.tsx --outdir=dist --bundle --format=esm --sourcemap --external:react-native --external:react && tsc",
1919
"watch": "npm-run-all --parallel build:watch copy",
2020
"copy": "cpx 'dist/**/*' app/node_modules/<%= name %>/dist --watch",
2121
"build:watch": "esbuild index.tsx --watch --outdir=dist --bundle --format=esm --sourcemap --external:react-native --external:react",
@@ -29,51 +29,38 @@
2929
"react-native": "^0.71.3"
3030
},
3131
"devDependencies": {
32-
"@react-native/eslint-config": "^0.72.2",
33-
"@types/jest": "^29.5.2",
34-
"@types/react": "^18.2.13",
35-
"@types/react-native": "^0.72.2",
36-
"@types/react-test-renderer": "^18.0.0",
37-
"@typescript-eslint/eslint-plugin": "^5.60.0",
38-
"@typescript-eslint/parser": "^5.60.0",
39-
"babel-jest": "^29.5.0",
32+
"@react-native-community/eslint-config": "^3.2.0",
33+
"@types/jest": "^29.5.10",
34+
"@types/react": "^18.2.41",
35+
"@types/react-native": "^0.72.7",
36+
"@types/react-test-renderer": "^18.0.7",
37+
"babel-jest": "^29.7.0",
4038
"cpx": "^1.5.0",
41-
"esbuild": "^0.18.5",
42-
"eslint": "^8.43.0",
39+
"esbuild": "^0.19.8",
40+
"eslint": "^8.55.0",
4341
"eslint-plugin-flowtype": "^8.0.3",
44-
"jest": "^29.5.0",
45-
"metro-react-native-babel-preset": "^0.76.6",
42+
"eslint-plugin-prettier": "^5.0.1",
43+
"jest": "^29.7.0",
44+
"metro-react-native-babel-preset": "^0.77.0",
4645
"npm-run-all": "^4.1.5",
47-
"prettier": "^2.8.8",
46+
"prettier": "^3.1.0",
4847
"react": "^18.2.0",
49-
"react-native": "^0.71.11",
48+
"react-native": "^0.72.7",
5049
"react-test-renderer": "^18.2.0",
51-
"typescript": "^5.1.3"
50+
"typescript": "^5.3.2"
5251
},
5352
"files": [
5453
"dist"
5554
],
5655
"eslintConfig": {
5756
"root": true,
58-
"extends": "@react-native",
57+
"extends": "@react-native-community",
5958
"rules": {
6059
"semi": 0
6160
},
6261
"ignorePatterns": [
6362
"dist",
6463
"app"
65-
],
66-
"parser": "@typescript-eslint/parser",
67-
"plugins": [
68-
"@typescript-eslint"
69-
],
70-
"overrides": [
71-
{
72-
"files": [
73-
"*.ts",
74-
"*.tsx"
75-
]
76-
}
7764
]
7865
},
7966
"prettier": {

0 commit comments

Comments
 (0)