Skip to content

Commit 5d31b83

Browse files
committed
chore: upgrade dependencies and align TypeScript configuration
1 parent f10260b commit 5d31b83

File tree

5 files changed

+1100
-836
lines changed

5 files changed

+1100
-836
lines changed

babel.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
module.exports = {
2-
presets: ['module:react-native-builder-bob/babel-preset'],
2+
overrides: [
3+
{
4+
exclude: /\/node_modules\//,
5+
presets: ['module:react-native-builder-bob/babel-preset'],
6+
},
7+
{
8+
include: /\/node_modules\//,
9+
presets: ['module:@react-native/babel-preset'],
10+
},
11+
],
312
};

eslint.config.mjs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { fixupConfigRules } from '@eslint/compat';
2+
import { FlatCompat } from '@eslint/eslintrc';
3+
import js from '@eslint/js';
4+
import prettier from 'eslint-plugin-prettier';
5+
import { defineConfig } from 'eslint/config';
6+
import path from 'node:path';
7+
import { fileURLToPath } from 'node:url';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
});
16+
17+
export default defineConfig([
18+
{
19+
extends: fixupConfigRules(compat.extends('@react-native', 'prettier')),
20+
plugins: { prettier },
21+
rules: {
22+
'react/react-in-jsx-scope': 'off',
23+
'prettier/prettier': [
24+
'error',
25+
{
26+
quoteProps: 'consistent',
27+
singleQuote: true,
28+
tabWidth: 2,
29+
trailingComma: 'es5',
30+
useTabs: false,
31+
},
32+
],
33+
},
34+
},
35+
{
36+
ignores: [
37+
'node_modules/',
38+
'lib/'
39+
],
40+
},
41+
]);

package.json

Lines changed: 24 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@
22
"name": "react-native-google-places-textinput",
33
"version": "0.7.1",
44
"description": "A customizable React Native TextInput component for Google Places Autocomplete using the Places API (New)",
5-
"source": "./src/index.tsx",
6-
"main": "./lib/commonjs/index.js",
7-
"module": "./lib/module/index.js",
5+
"main": "./lib/module/index.js",
6+
"types": "./lib/typescript/src/index.d.ts",
87
"exports": {
98
".": {
10-
"import": {
11-
"types": "./lib/typescript/module/src/index.d.ts",
12-
"default": "./lib/module/index.js"
13-
},
14-
"require": {
15-
"types": "./lib/typescript/commonjs/src/index.d.ts",
16-
"default": "./lib/commonjs/index.js"
17-
}
18-
}
9+
"source": "./src/index.tsx",
10+
"types": "./lib/typescript/src/index.d.ts",
11+
"default": "./lib/module/index.js"
12+
},
13+
"./package.json": "./package.json"
1914
},
2015
"files": [
2116
"src",
@@ -43,7 +38,7 @@
4338
"lint": "eslint \"**/*.{js,ts,tsx}\"",
4439
"clean": "del-cli lib",
4540
"prepare": "bob build",
46-
"release": "release-it"
41+
"release": "release-it --only-version"
4742
},
4843
"keywords": [
4944
"address",
@@ -73,26 +68,27 @@
7368
},
7469
"devDependencies": {
7570
"@commitlint/config-conventional": "^19.6.0",
71+
"@eslint/compat": "^1.2.7",
72+
"@eslint/eslintrc": "^3.3.0",
73+
"@eslint/js": "^9.22.0",
7674
"@evilmartians/lefthook": "^1.5.0",
77-
"@react-native/eslint-config": "^0.73.1",
75+
"@react-native/babel-preset": "0.78.2",
76+
"@react-native/eslint-config": "^0.78.0",
7877
"@release-it/conventional-changelog": "^9.0.2",
7978
"@types/jest": "^29.5.5",
80-
"@types/react": "^18.2.44",
79+
"@types/react": "^19.0.12",
8180
"commitlint": "^19.6.1",
8281
"del-cli": "^5.1.0",
83-
"eslint": "^8.51.0",
84-
"eslint-config-prettier": "^9.0.0",
85-
"eslint-plugin-prettier": "^5.0.1",
82+
"eslint": "^9.22.0",
83+
"eslint-config-prettier": "^10.1.1",
84+
"eslint-plugin-prettier": "^5.2.3",
8685
"jest": "^29.7.0",
8786
"prettier": "^3.0.3",
88-
"react": "18.3.1",
89-
"react-native": "0.76.7",
90-
"react-native-builder-bob": "^0.38.0",
87+
"react": "19.0.0",
88+
"react-native": "0.79.3",
89+
"react-native-builder-bob": "^0.40.11",
9190
"release-it": "^17.10.0",
92-
"typescript": "^5.2.2"
93-
},
94-
"resolutions": {
95-
"@types/react": "^18.2.44"
91+
"typescript": "^5.8.3"
9692
},
9793
"peerDependencies": {
9894
"react": "*",
@@ -133,30 +129,6 @@
133129
}
134130
}
135131
},
136-
"eslintConfig": {
137-
"root": true,
138-
"extends": [
139-
"@react-native",
140-
"prettier"
141-
],
142-
"rules": {
143-
"react/react-in-jsx-scope": "off",
144-
"prettier/prettier": [
145-
"error",
146-
{
147-
"quoteProps": "consistent",
148-
"singleQuote": true,
149-
"tabWidth": 2,
150-
"trailingComma": "es5",
151-
"useTabs": false
152-
}
153-
]
154-
}
155-
},
156-
"eslintIgnore": [
157-
"node_modules/",
158-
"lib/"
159-
],
160132
"prettier": {
161133
"quoteProps": "consistent",
162134
"singleQuote": true,
@@ -168,12 +140,6 @@
168140
"source": "src",
169141
"output": "lib",
170142
"targets": [
171-
[
172-
"commonjs",
173-
{
174-
"esm": true
175-
}
176-
],
177143
[
178144
"module",
179145
{
@@ -183,16 +149,14 @@
183149
[
184150
"typescript",
185151
{
186-
"project": "tsconfig.build.json",
187-
"esm": true
152+
"project": "tsconfig.build.json"
188153
}
189154
]
190155
]
191156
},
192157
"create-react-native-library": {
193158
"languages": "js",
194159
"type": "library",
195-
"version": "0.48.5"
196-
},
197-
"types": "./lib/typescript/commonjs/src/index.d.ts"
160+
"version": "0.50.3"
161+
}
198162
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"jsx": "react-jsx",
1212
"lib": ["ESNext"],
1313
"module": "ESNext",
14-
"moduleResolution": "Bundler",
14+
"moduleResolution": "bundler",
1515
"noEmit": true,
1616
"noFallthroughCasesInSwitch": true,
1717
"noImplicitReturns": true,

0 commit comments

Comments
 (0)