@ccrf01/react-native-template 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +28 -0
- package/.vscode/settings.json +15 -0
- package/README.md +58 -0
- package/package.json +16 -0
- package/template/.bundle/config +2 -0
- package/template/.env.development +1 -0
- package/template/.env.production +1 -0
- package/template/.eslintrc.js +392 -0
- package/template/.java-version +1 -0
- package/template/.prettierrc.js +5 -0
- package/template/.ruby-version +1 -0
- package/template/.watchmanconfig +1 -0
- package/template/Gemfile +23 -0
- package/template/Gemfile.lock +330 -0
- package/template/README.md +97 -0
- package/template/ReactotronConfig.js +17 -0
- package/template/__tests__/App.test.tsx +13 -0
- package/template/_gitignore +75 -0
- package/template/_node-version +1 -0
- package/template/android/app/build.gradle +162 -0
- package/template/android/app/debug.keystore +0 -0
- package/template/android/app/proguard-rules.pro +10 -0
- package/template/android/app/src/debug/AndroidManifest.xml +9 -0
- package/template/android/app/src/main/AndroidManifest.xml +26 -0
- package/template/android/app/src/main/java/com/projectname/MainActivity.kt +30 -0
- package/template/android/app/src/main/java/com/projectname/MainApplication.kt +27 -0
- package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/values/strings.xml +3 -0
- package/template/android/app/src/main/res/values/styles.xml +9 -0
- package/template/android/build.gradle +37 -0
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/template/android/gradle.properties +48 -0
- package/template/android/gradlew +251 -0
- package/template/android/gradlew.bat +99 -0
- package/template/android/keystore/keystore.properties +4 -0
- package/template/android/settings.gradle +6 -0
- package/template/android/version.properties +2 -0
- package/template/app.json +4 -0
- package/template/babel.config.js +38 -0
- package/template/fastlane/Fastfile +136 -0
- package/template/fastlane/Pluginfile +9 -0
- package/template/fastlane/README.md +46 -0
- package/template/index.js +9 -0
- package/template/ios/.xcode.env +11 -0
- package/template/ios/Podfile +35 -0
- package/template/ios/Podfile.lock +3669 -0
- package/template/ios/ProjectName/AppDelegate.swift +48 -0
- package/template/ios/ProjectName/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/template/ios/ProjectName/Images.xcassets/Contents.json +6 -0
- package/template/ios/ProjectName/Info.plist +66 -0
- package/template/ios/ProjectName/LaunchScreen.storyboard +47 -0
- package/template/ios/ProjectName/PrivacyInfo.xcprivacy +47 -0
- package/template/ios/ProjectName.xcodeproj/project.pbxproj +482 -0
- package/template/ios/ProjectName.xcodeproj/xcshareddata/xcschemes/ProjectName.xcscheme +88 -0
- package/template/ios/ProjectName.xcworkspace/contents.xcworkspacedata +10 -0
- package/template/jest.config.js +3 -0
- package/template/metro.config.js +20 -0
- package/template/package-lock.json +17073 -0
- package/template/package.json +156 -0
- package/template/src/@types/emotion.d.ts +12 -0
- package/template/src/@types/env.d.ts +3 -0
- package/template/src/@types/redux-persist-transform-immutable.d.ts +1 -0
- package/template/src/@types/typing.d.ts +17 -0
- package/template/src/AppContainer.tsx +109 -0
- package/template/src/assets/images/143.png +0 -0
- package/template/src/assets/index.ts +13 -0
- package/template/src/components/basic/BackButton/index.tsx +34 -0
- package/template/src/components/basic/Body/index.tsx +68 -0
- package/template/src/components/basic/Button/index.tsx +181 -0
- package/template/src/components/basic/Button/utils.ts +78 -0
- package/template/src/components/basic/ButtonGroup/index.tsx +182 -0
- package/template/src/components/basic/Card/index.tsx +3 -0
- package/template/src/components/basic/Container/index.tsx +38 -0
- package/template/src/components/basic/Content/index.tsx +87 -0
- package/template/src/components/basic/DropDown/index.tsx +354 -0
- package/template/src/components/basic/ExpandableOverlay/index.tsx +113 -0
- package/template/src/components/basic/Header/index.tsx +216 -0
- package/template/src/components/basic/Header/styles.ts +0 -0
- package/template/src/components/basic/Icons/index.tsx +131 -0
- package/template/src/components/basic/InputLabel/index.tsx +19 -0
- package/template/src/components/basic/LoadingOverlay/index.tsx +68 -0
- package/template/src/components/basic/MaterialTextInput/index.tsx +153 -0
- package/template/src/components/basic/NumberInput/index.tsx +53 -0
- package/template/src/components/basic/Picker/PickerContext.ts +7 -0
- package/template/src/components/basic/Picker/PickerHeader.tsx +130 -0
- package/template/src/components/basic/Picker/PickerItem.tsx +105 -0
- package/template/src/components/basic/Picker/PickerItemsList.tsx +135 -0
- package/template/src/components/basic/Picker/PickerPresenter.ts +54 -0
- package/template/src/components/basic/Picker/hooks/useImperativePickerHandle.ts +27 -0
- package/template/src/components/basic/Picker/hooks/usePickerLabel.ts +74 -0
- package/template/src/components/basic/Picker/hooks/usePickerSearch.ts +37 -0
- package/template/src/components/basic/Picker/hooks/usePickerSelection.ts +57 -0
- package/template/src/components/basic/Picker/index.tsx +284 -0
- package/template/src/components/basic/Picker/types.tsx +229 -0
- package/template/src/components/basic/PressableOpacity/index.tsx +20 -0
- package/template/src/components/basic/RootDialog/Dialog.tsx +246 -0
- package/template/src/components/basic/RootDialog/Manager.tsx +110 -0
- package/template/src/components/basic/RootDialog/animations/Animation.ts +29 -0
- package/template/src/components/basic/RootDialog/animations/FadeAnimation.ts +40 -0
- package/template/src/components/basic/RootDialog/animations/ScaleAnimation.ts +37 -0
- package/template/src/components/basic/RootDialog/animations/SlideAnimation.ts +89 -0
- package/template/src/components/basic/RootDialog/components/Backdrop.tsx +60 -0
- package/template/src/components/basic/RootDialog/components/BaseDialog.tsx +564 -0
- package/template/src/components/basic/RootDialog/components/BottomDialog.tsx +32 -0
- package/template/src/components/basic/RootDialog/components/DialogButton.tsx +87 -0
- package/template/src/components/basic/RootDialog/components/DialogContent.tsx +26 -0
- package/template/src/components/basic/RootDialog/components/DialogContext.tsx +8 -0
- package/template/src/components/basic/RootDialog/components/DialogFooter.tsx +42 -0
- package/template/src/components/basic/RootDialog/components/DialogTitle.tsx +53 -0
- package/template/src/components/basic/RootDialog/components/DraggableView.tsx +271 -0
- package/template/src/components/basic/RootDialog/index.ts +21 -0
- package/template/src/components/basic/RootDialog/type.ts +102 -0
- package/template/src/components/basic/Text/index.tsx +8 -0
- package/template/src/components/basic/index.ts +35 -0
- package/template/src/configs/constants/type/APIStatus.type.ts +8 -0
- package/template/src/configs/constants/type/Locale.type.ts +7 -0
- package/template/src/configs/constants/type/StorageKey.type.ts +7 -0
- package/template/src/configs/constants/type/ThemeType.type.ts +6 -0
- package/template/src/configs/constants/type/index.ts +11 -0
- package/template/src/configs/index.ts +22 -0
- package/template/src/contexts/ThemeContext.ts +6 -0
- package/template/src/hooks/useAppLoading.ts +26 -0
- package/template/src/hooks/useAppState.ts +36 -0
- package/template/src/hooks/useArray.ts +47 -0
- package/template/src/hooks/useAsync.ts +42 -0
- package/template/src/hooks/useAsyncStorage.ts +41 -0
- package/template/src/hooks/useBoolean.ts +21 -0
- package/template/src/hooks/useBuildTheme.ts +249 -0
- package/template/src/hooks/useCountDown.ts +111 -0
- package/template/src/hooks/useCounter.ts +27 -0
- package/template/src/hooks/useDebounce.ts +25 -0
- package/template/src/hooks/useDebouncedValidate.ts +32 -0
- package/template/src/hooks/useDebugInformation.ts +38 -0
- package/template/src/hooks/useDeviceToken.ts +20 -0
- package/template/src/hooks/useEncryptedStorage.ts +41 -0
- package/template/src/hooks/useFontFamily.ts +13 -0
- package/template/src/hooks/useHttp.ts +18 -0
- package/template/src/hooks/useInterval.ts +24 -0
- package/template/src/hooks/useIsForeground.ts +17 -0
- package/template/src/hooks/useMMKVStorage.ts +0 -0
- package/template/src/hooks/usePrevious.ts +12 -0
- package/template/src/hooks/useRenderCount.ts +10 -0
- package/template/src/hooks/useTheme.ts +17 -0
- package/template/src/hooks/useTimeCountDown.ts +91 -0
- package/template/src/index.tsx +65 -0
- package/template/src/infrastructures/NetClient/AbstractClient.ts +66 -0
- package/template/src/infrastructures/NetClient/ApiResponse.ts +16 -0
- package/template/src/infrastructures/NetClient/ApisauceClient.ts +76 -0
- package/template/src/infrastructures/NetClient/AxiosClient.ts +80 -0
- package/template/src/infrastructures/NetClient/FetchNetClient.ts +120 -0
- package/template/src/infrastructures/NetClient/config.ts +3 -0
- package/template/src/infrastructures/NetClient/interfaces/INetClient.ts +6 -0
- package/template/src/infrastructures/Storage/IStorage.ts +7 -0
- package/template/src/infrastructures/Storage/MMKVStorage.ts +41 -0
- package/template/src/infrastructures/common/Timeout.ts +27 -0
- package/template/src/infrastructures/common/colorUtils.ts +82 -0
- package/template/src/infrastructures/common/dateUtils.ts +39 -0
- package/template/src/infrastructures/common/logger.ts +115 -0
- package/template/src/locales/en-US/general.json +26 -0
- package/template/src/locales/en-US/index.ts +9 -0
- package/template/src/locales/en-US/screens.json +4 -0
- package/template/src/locales/en-US/setting.json +3 -0
- package/template/src/locales/i18n.ts +109 -0
- package/template/src/locales/zh-TW/general.json +26 -0
- package/template/src/locales/zh-TW/index.ts +9 -0
- package/template/src/locales/zh-TW/screens.json +4 -0
- package/template/src/locales/zh-TW/setting.json +3 -0
- package/template/src/models/index.ts +5 -0
- package/template/src/models/request.model.ts +50 -0
- package/template/src/navigators/DrawerNav/DrawerContent.tsx +66 -0
- package/template/src/navigators/DrawerNav/DrawerItem.tsx +261 -0
- package/template/src/navigators/DrawerNav/index.tsx +39 -0
- package/template/src/navigators/DrawerNav/props.ts +12 -0
- package/template/src/navigators/DrawerNav/types.ts +8 -0
- package/template/src/navigators/MainBottomTabNav/index.tsx +83 -0
- package/template/src/navigators/MainBottomTabNav/props.ts +16 -0
- package/template/src/navigators/MainBottomTabNav/types.ts +6 -0
- package/template/src/navigators/RootStack.tsx +43 -0
- package/template/src/navigators/index.tsx +40 -0
- package/template/src/navigators/props.ts +14 -0
- package/template/src/navigators/types.ts +18 -0
- package/template/src/navigators/utils.ts +68 -0
- package/template/src/redux/api/api.ts +41 -0
- package/template/src/redux/reducers/appSlice.ts +26 -0
- package/template/src/redux/reducers/index.ts +21 -0
- package/template/src/redux/reducers/nonPersistSlice.ts +51 -0
- package/template/src/redux/reducers/settingSlice.ts +48 -0
- package/template/src/redux/reducers/themeSlice.ts +55 -0
- package/template/src/redux/saga/index.ts +5 -0
- package/template/src/redux/saga/settingSaga.ts +21 -0
- package/template/src/redux/selectors/app.ts +9 -0
- package/template/src/redux/selectors/nonPersist.ts +23 -0
- package/template/src/redux/selectors/setting.ts +29 -0
- package/template/src/redux/selectors/theme.ts +13 -0
- package/template/src/redux/store/index.ts +79 -0
- package/template/src/redux/store/types.d.ts +5 -0
- package/template/src/screens/Home/index.tsx +146 -0
- package/template/src/screens/Settings/components/Item.tsx +45 -0
- package/template/src/screens/Settings/index.tsx +97 -0
- package/template/src/screens/Splash/index.tsx +53 -0
- package/template/src/services/Dialogs.tsx +226 -0
- package/template/src/services/PermissionCheck.ts +257 -0
- package/template/src/theme/Common.ts +48 -0
- package/template/src/theme/Fonts.ts +196 -0
- package/template/src/theme/Gutters.ts +63 -0
- package/template/src/theme/Icons.ts +28 -0
- package/template/src/theme/Images.ts +13 -0
- package/template/src/theme/Layout.ts +106 -0
- package/template/src/theme/Variables.ts +167 -0
- package/template/src/theme/components/Buttons.ts +37 -0
- package/template/src/theme/index.ts +8 -0
- package/template/src/theme/metrics.ts +57 -0
- package/template/src/theme/themes/default_dark/Images.ts +7 -0
- package/template/src/theme/themes/default_dark/Variables.ts +84 -0
- package/template/src/theme/themes/default_dark/index.ts +2 -0
- package/template/src/theme/themes/index.ts +8 -0
- package/template/src/theme/types.ts +152 -0
- package/template/src/utils/encrypt-helper.ts +118 -0
- package/template/src/utils/index.ts +76 -0
- package/template/src/utils/sys-info-data.ts +17 -0
- package/template/tsconfig.json +44 -0
- package/template.config.js +8 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Publish Package to npmjs
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [created]
|
|
5
|
+
permissions:
|
|
6
|
+
id-token: write # Required for OIDC
|
|
7
|
+
contents: read
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Setup Node.js
|
|
16
|
+
uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: '24'
|
|
19
|
+
registry-url: 'https://registry.npmjs.org'
|
|
20
|
+
|
|
21
|
+
- name: Update npm to latest
|
|
22
|
+
run: npm install -g npm@latest
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
|
|
27
|
+
- name: Publish to npm
|
|
28
|
+
run: npm publish
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"i18n-ally.localesPaths": [
|
|
3
|
+
"template/src/locales",
|
|
4
|
+
"template/ios/Pods/Flipper-Folly/folly/lang",
|
|
5
|
+
"template/ios/Pods/Flipper-Boost-iOSX/boost/locale",
|
|
6
|
+
"template/ios/Pods/boost/boost/locale",
|
|
7
|
+
"template/ios/Pods/RCT-Folly/folly/lang",
|
|
8
|
+
"template/ios/Pods/Flipper-Boost-iOSX/boost/predef/language",
|
|
9
|
+
"template/ios/Pods/boost/boost/predef/language",
|
|
10
|
+
"template/ios/Pods/Headers/Private/Flipper-Folly/folly/lang",
|
|
11
|
+
"template/ios/Pods/Headers/Private/RCT-Folly/folly/lang",
|
|
12
|
+
"template/ios/Pods/Headers/Public/Flipper-Folly/folly/lang",
|
|
13
|
+
"template/ios/Pods/Headers/Public/RCT-Folly/folly/lang"
|
|
14
|
+
]
|
|
15
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[](https://github.com/ccyfly/react-native-template/actions/workflows/npm-publish.yml)
|
|
2
|
+
|
|
3
|
+
# React-Native-Custom-Template
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
To create a new project using the boilerplate simply run:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npx react-native init MyApp --template @ccrf01/react-native-template
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Library included
|
|
14
|
+
|
|
15
|
+
[@react-native-async-storage/async-storage](https://github.com/react-native-async-storage/async-storage)
|
|
16
|
+
[@react-native-masked-view/masked-view](https://github.com/react-native-masked-view/masked-view)
|
|
17
|
+
[@react-navigation/bottom-tabs@6](https://reactnavigation.org/docs/bottom-tab-navigator/)
|
|
18
|
+
[@react-navigation/material-bottom-tabs@6](https://reactnavigation.org/docs/material-bottom-tab-navigator)
|
|
19
|
+
[@react-navigation/native@6](https://reactnavigation.org/)
|
|
20
|
+
[@react-navigation/stack@6](https://reactnavigation.org/docs/stack-navigator)
|
|
21
|
+
[react-native-gesture-handler](https://github.com/software-mansion/react-native-gesture-handler)
|
|
22
|
+
[react-native-screens](https://github.com/software-mansion/react-native-screens)
|
|
23
|
+
[react-native-safe-area-context](https://github.com/th3rdwave/react-native-safe-area-context)
|
|
24
|
+
[react-native-reanimated@2.8.0](https://github.com/software-mansion/react-native-reanimated)
|
|
25
|
+
[react-native-paper](https://callstack.github.io/react-native-paper/)
|
|
26
|
+
[react-native-vector-icons](https://github.com/oblador/react-native-vector-icons)
|
|
27
|
+
[react-native-svg](https://github.com/react-native-svg/react-native-svg)
|
|
28
|
+
[Emotion](https://emotion.sh/docs/@emotion/native)
|
|
29
|
+
[@reduxjs/toolkit](https://redux-toolkit.js.org)
|
|
30
|
+
[redux](https://redux.js.org)
|
|
31
|
+
[react-redux](https://react-redux.js.org)
|
|
32
|
+
[redux-persist](https://github.com/rt2zz/redux-persist)
|
|
33
|
+
[redux-persist-transform-immutable]()
|
|
34
|
+
[redux-saga](https://redux-saga.js.org)
|
|
35
|
+
[reselect](https://github.com/reduxjs/reselect)
|
|
36
|
+
[typesafe-actions](https://github.com/piotrwitek/typesafe-actions)
|
|
37
|
+
[apisauce](https://github.com/infinitered/apisauce)
|
|
38
|
+
[i18next](https://www.i18next.com)
|
|
39
|
+
[react-i18next](https://react.i18next.com)
|
|
40
|
+
[react-native-localize](https://github.com/zoontek/react-native-localize)
|
|
41
|
+
[react-native-root-siblings](https://github.com/magicismight/react-native-root-siblings)
|
|
42
|
+
[react-native-keyboard-aware-scroll-view](https://github.com/APSL/react-native-keyboard-aware-scroll-view)
|
|
43
|
+
|
|
44
|
+
## Directory layout
|
|
45
|
+
|
|
46
|
+
`src\assets`, asset files like images / fonts
|
|
47
|
+
`src\components`, shared components
|
|
48
|
+
`src\configs`, application's configs like storage key, api key, etc
|
|
49
|
+
`src\contexts`, React Context like Theme Context
|
|
50
|
+
`src\hooks`, hooks
|
|
51
|
+
`src\infrastructures`, NetClients, logger, Timeout
|
|
52
|
+
`src\locales`, i18n language files
|
|
53
|
+
`src\models`, data model interfaces
|
|
54
|
+
`src\navigators`, react-navigation's navigators
|
|
55
|
+
`src\redux`, redux store, reducer, saga and selector
|
|
56
|
+
`src\screens`, presentational components
|
|
57
|
+
`src\theme`, theme style
|
|
58
|
+
`src\utils`, utility functions
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ccrf01/react-native-template",
|
|
3
|
+
"version": "0.0.16",
|
|
4
|
+
"description": "React Native Template",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/ccrf01/react-native-template"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public",
|
|
11
|
+
"provenance": true
|
|
12
|
+
},
|
|
13
|
+
"author": "CalvinC <ccyfly@gmail.com>",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/ccrf01/react-native-template#readme"
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
REACT_APP_DEBUG=true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
REACT_APP_DEBUG=false
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
settings: {
|
|
4
|
+
react: {
|
|
5
|
+
version: '17',
|
|
6
|
+
},
|
|
7
|
+
'import/parsers': {
|
|
8
|
+
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
9
|
+
},
|
|
10
|
+
'import/resolver': {
|
|
11
|
+
typescript: {
|
|
12
|
+
alwaysTryTypes: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
globals: {
|
|
17
|
+
browser: true,
|
|
18
|
+
},
|
|
19
|
+
env: {
|
|
20
|
+
browser: true,
|
|
21
|
+
es6: true,
|
|
22
|
+
},
|
|
23
|
+
extends: [
|
|
24
|
+
'plugin:@typescript-eslint/recommended',
|
|
25
|
+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
26
|
+
'plugin:react/recommended',
|
|
27
|
+
'prettier',
|
|
28
|
+
],
|
|
29
|
+
parser: '@typescript-eslint/parser',
|
|
30
|
+
parserOptions: {
|
|
31
|
+
project: ['./tsconfig.json'],
|
|
32
|
+
sourceType: 'module',
|
|
33
|
+
},
|
|
34
|
+
ignorePatterns: [
|
|
35
|
+
'node_modules/**',
|
|
36
|
+
'@types/**',
|
|
37
|
+
'**/__tests__/**',
|
|
38
|
+
'*.config.js',
|
|
39
|
+
'**/*.d.ts',
|
|
40
|
+
'.eslintrc.js',
|
|
41
|
+
],
|
|
42
|
+
plugins: [
|
|
43
|
+
'react',
|
|
44
|
+
'eslint-plugin-import',
|
|
45
|
+
'eslint-plugin-jsdoc',
|
|
46
|
+
'eslint-plugin-prefer-arrow',
|
|
47
|
+
'eslint-plugin-react',
|
|
48
|
+
'@typescript-eslint',
|
|
49
|
+
'simple-import-sort',
|
|
50
|
+
'import-newlines',
|
|
51
|
+
'newline-destructuring',
|
|
52
|
+
'sort-destructure-keys',
|
|
53
|
+
],
|
|
54
|
+
rules: {
|
|
55
|
+
'@typescript-eslint/array-type': [
|
|
56
|
+
'error',
|
|
57
|
+
{
|
|
58
|
+
default: 'array',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
'comma-spacing': [
|
|
62
|
+
'error',
|
|
63
|
+
{
|
|
64
|
+
before: false,
|
|
65
|
+
after: true,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'@typescript-eslint/ban-types': [
|
|
69
|
+
'error',
|
|
70
|
+
{
|
|
71
|
+
types: {
|
|
72
|
+
Object: {
|
|
73
|
+
message: 'Avoid using the `Object` type. Did you mean `object`?',
|
|
74
|
+
},
|
|
75
|
+
Function: {
|
|
76
|
+
message:
|
|
77
|
+
'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.',
|
|
78
|
+
},
|
|
79
|
+
Boolean: {
|
|
80
|
+
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
|
|
81
|
+
},
|
|
82
|
+
Number: {
|
|
83
|
+
message: 'Avoid using the `Number` type. Did you mean `number`?',
|
|
84
|
+
},
|
|
85
|
+
String: {
|
|
86
|
+
message: 'Avoid using the `String` type. Did you mean `string`?',
|
|
87
|
+
},
|
|
88
|
+
Symbol: {
|
|
89
|
+
message: 'Avoid using the `Symbol` type. Did you mean `symbol`?',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
'@typescript-eslint/dot-notation': 'error',
|
|
95
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
96
|
+
'off',
|
|
97
|
+
{
|
|
98
|
+
accessibility: 'explicit',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
'@typescript-eslint/explicit-module-boundary-types': [
|
|
102
|
+
'off',
|
|
103
|
+
{
|
|
104
|
+
allowArgumentsExplicitlyTypedAsAny: true,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
'@typescript-eslint/indent': [
|
|
108
|
+
'error',
|
|
109
|
+
2,
|
|
110
|
+
{
|
|
111
|
+
ignoredNodes: ['TSTypeParameterInstantiation'],
|
|
112
|
+
SwitchCase: 1,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
'@typescript-eslint/member-delimiter-style': [
|
|
116
|
+
'error',
|
|
117
|
+
{
|
|
118
|
+
multiline: {
|
|
119
|
+
delimiter: 'none',
|
|
120
|
+
requireLast: false,
|
|
121
|
+
},
|
|
122
|
+
singleline: {
|
|
123
|
+
delimiter: 'semi',
|
|
124
|
+
requireLast: false,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
129
|
+
'@typescript-eslint/no-parameter-properties': 'off',
|
|
130
|
+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
|
131
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
132
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
133
|
+
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
134
|
+
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
135
|
+
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
136
|
+
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
137
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
138
|
+
'@typescript-eslint/prefer-for-of': 'error',
|
|
139
|
+
'@typescript-eslint/prefer-function-type': 'error',
|
|
140
|
+
'@typescript-eslint/quotes': [
|
|
141
|
+
'error',
|
|
142
|
+
'single',
|
|
143
|
+
{
|
|
144
|
+
avoidEscape: true,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
148
|
+
semi: 'off',
|
|
149
|
+
'@typescript-eslint/semi': ['error', 'never'],
|
|
150
|
+
'@typescript-eslint/triple-slash-reference': [
|
|
151
|
+
'error',
|
|
152
|
+
{
|
|
153
|
+
path: 'always',
|
|
154
|
+
types: 'prefer-import',
|
|
155
|
+
lib: 'always',
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
159
|
+
'@typescript-eslint/unified-signatures': 'error',
|
|
160
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
161
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
162
|
+
'@typescript-eslint/no-shadow': ['error'],
|
|
163
|
+
'@typescript-eslint/naming-convention': [
|
|
164
|
+
'error',
|
|
165
|
+
{
|
|
166
|
+
selector: 'default',
|
|
167
|
+
format: ['camelCase', 'PascalCase'],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
selector: 'variable',
|
|
171
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
172
|
+
leadingUnderscore: 'allow',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
selector: 'property',
|
|
176
|
+
format: ['camelCase', 'PascalCase', 'snake_case'],
|
|
177
|
+
leadingUnderscore: 'allow',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
selector: 'property',
|
|
181
|
+
modifiers: ['private'],
|
|
182
|
+
format: ['camelCase', 'PascalCase'],
|
|
183
|
+
leadingUnderscore: 'allow',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
selector: 'property',
|
|
187
|
+
modifiers: ['static'],
|
|
188
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
selector: 'property',
|
|
192
|
+
modifiers: ['readonly'],
|
|
193
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
selector: 'accessor',
|
|
197
|
+
modifiers: ['public'],
|
|
198
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
selector: 'parameter',
|
|
202
|
+
format: ['camelCase', 'PascalCase'],
|
|
203
|
+
leadingUnderscore: 'allow',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
selector: 'memberLike',
|
|
207
|
+
modifiers: ['private'],
|
|
208
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
209
|
+
leadingUnderscore: 'require',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
selector: 'enumMember',
|
|
213
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
selector: 'typeLike',
|
|
217
|
+
format: ['PascalCase'],
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
selector: 'interface',
|
|
221
|
+
format: ['StrictPascalCase'],
|
|
222
|
+
leadingUnderscore: 'allow',
|
|
223
|
+
prefix: ['I'],
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
'arrow-parens': ['off', 'always'],
|
|
227
|
+
'brace-style': ['off', 'off'],
|
|
228
|
+
'comma-dangle': ['error', 'always-multiline'],
|
|
229
|
+
complexity: 'off',
|
|
230
|
+
'constructor-super': 'error',
|
|
231
|
+
curly: ['error', 'multi-line'],
|
|
232
|
+
'eol-last': 'error',
|
|
233
|
+
eqeqeq: ['error', 'smart'],
|
|
234
|
+
'guard-for-in': 'error',
|
|
235
|
+
'id-blacklist': 'off',
|
|
236
|
+
'id-match': 'off',
|
|
237
|
+
'jsdoc/check-alignment': 'error',
|
|
238
|
+
'jsdoc/check-indentation': 'error',
|
|
239
|
+
'jsx-quotes': ['error', 'prefer-double'],
|
|
240
|
+
'linebreak-style': 'off',
|
|
241
|
+
'max-classes-per-file': ['error', 1],
|
|
242
|
+
'max-len': 'off',
|
|
243
|
+
'new-parens': 'off',
|
|
244
|
+
'newline-per-chained-call': 'error',
|
|
245
|
+
'no-bitwise': 'error',
|
|
246
|
+
'no-caller': 'error',
|
|
247
|
+
'no-cond-assign': 'error',
|
|
248
|
+
'no-console': 'error',
|
|
249
|
+
'no-debugger': 'error',
|
|
250
|
+
'no-duplicate-imports': 'error',
|
|
251
|
+
'no-empty': 'error',
|
|
252
|
+
'no-eval': 'error',
|
|
253
|
+
'no-extra-semi': 'off',
|
|
254
|
+
'no-fallthrough': 'off',
|
|
255
|
+
'no-invalid-this': 'off',
|
|
256
|
+
'no-irregular-whitespace': 'off',
|
|
257
|
+
'no-multiple-empty-lines': 'error',
|
|
258
|
+
'no-new-wrappers': 'error',
|
|
259
|
+
'no-shadow': 'off',
|
|
260
|
+
'no-throw-literal': 'error',
|
|
261
|
+
'no-trailing-spaces': 'error',
|
|
262
|
+
'no-undef-init': 'error',
|
|
263
|
+
'no-underscore-dangle': 'off',
|
|
264
|
+
'no-unsafe-finally': 'error',
|
|
265
|
+
'no-unused-labels': 'error',
|
|
266
|
+
'object-shorthand': 'off',
|
|
267
|
+
'one-var': ['error', 'never'],
|
|
268
|
+
'padding-line-between-statements': [
|
|
269
|
+
'error',
|
|
270
|
+
{
|
|
271
|
+
blankLine: 'always',
|
|
272
|
+
prev: '*',
|
|
273
|
+
next: 'return',
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
// 'prefer-arrow/prefer-arrow-functions': 'error',
|
|
277
|
+
'prefer-template': 'off',
|
|
278
|
+
'quote-props': ['error', 'as-needed'],
|
|
279
|
+
radix: 'error',
|
|
280
|
+
'react/jsx-boolean-value': 'error',
|
|
281
|
+
'react/jsx-curly-spacing': 'off',
|
|
282
|
+
'react/jsx-equals-spacing': 'off',
|
|
283
|
+
'react/jsx-key': 'error',
|
|
284
|
+
'react/jsx-no-bind': [
|
|
285
|
+
1,
|
|
286
|
+
{
|
|
287
|
+
ignoreRefs: true,
|
|
288
|
+
allowBind: false,
|
|
289
|
+
allowArrowFunctions: true,
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
'react/jsx-wrap-multilines': 'off',
|
|
293
|
+
'react/jsx-closing-bracket-location': [1, 'tag-aligned'],
|
|
294
|
+
'array-bracket-newline': [
|
|
295
|
+
'error',
|
|
296
|
+
{
|
|
297
|
+
multiline: true,
|
|
298
|
+
minItems: 6,
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
'array-element-newline': [
|
|
302
|
+
'error',
|
|
303
|
+
{
|
|
304
|
+
ArrayExpression: 'consistent',
|
|
305
|
+
ArrayPattern: {
|
|
306
|
+
minItems: 4,
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
'object-curly-newline': [
|
|
311
|
+
'error',
|
|
312
|
+
{
|
|
313
|
+
ObjectExpression: {
|
|
314
|
+
multiline: true,
|
|
315
|
+
minProperties: 6,
|
|
316
|
+
consistent: true,
|
|
317
|
+
},
|
|
318
|
+
ObjectPattern: {
|
|
319
|
+
multiline: true,
|
|
320
|
+
minProperties: 6,
|
|
321
|
+
consistent: true,
|
|
322
|
+
},
|
|
323
|
+
ImportDeclaration: {
|
|
324
|
+
multiline: true,
|
|
325
|
+
minProperties: 6,
|
|
326
|
+
consistent: true,
|
|
327
|
+
},
|
|
328
|
+
ExportDeclaration: {
|
|
329
|
+
multiline: true,
|
|
330
|
+
minProperties: 6,
|
|
331
|
+
consistent: true,
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
'object-curly-spacing': ['error', 'always'],
|
|
336
|
+
'object-property-newline': [
|
|
337
|
+
'error',
|
|
338
|
+
{
|
|
339
|
+
allowAllPropertiesOnSameLine: true,
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
'import-newlines/enforce': ['error', 5],
|
|
343
|
+
'function-call-argument-newline': ['error', 'consistent'],
|
|
344
|
+
'simple-import-sort/imports': 'error',
|
|
345
|
+
'simple-import-sort/exports': 'error',
|
|
346
|
+
'newline-destructuring/newline': [
|
|
347
|
+
'error',
|
|
348
|
+
{
|
|
349
|
+
items: 5,
|
|
350
|
+
itemsWithRest: 2,
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
'sort-destructure-keys/sort-destructure-keys': [
|
|
354
|
+
'error',
|
|
355
|
+
{
|
|
356
|
+
caseSensitive: false,
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
'space-before-function-paren': [
|
|
360
|
+
'error',
|
|
361
|
+
{
|
|
362
|
+
anonymous: 'always',
|
|
363
|
+
named: 'never',
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
'space-in-parens': ['off', 'never'],
|
|
367
|
+
'spaced-comment': [
|
|
368
|
+
'error',
|
|
369
|
+
'always',
|
|
370
|
+
{
|
|
371
|
+
markers: ['/'],
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
'use-isnan': 'error',
|
|
375
|
+
'valid-typeof': 'off',
|
|
376
|
+
'no-async-promise-executor': 'off',
|
|
377
|
+
'space-infix-ops': 'off',
|
|
378
|
+
},
|
|
379
|
+
overrides: [
|
|
380
|
+
{
|
|
381
|
+
files: ['*.ts', '*.tsx'],
|
|
382
|
+
rules: {
|
|
383
|
+
'@typescript-eslint/no-shadow': ['error'],
|
|
384
|
+
'no-shadow': 'off',
|
|
385
|
+
'no-undef': 'off',
|
|
386
|
+
},
|
|
387
|
+
parserOptions: {
|
|
388
|
+
project: ['./tsconfig.json'], // Specify it only for TypeScript files
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
],
|
|
392
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
21.0.5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/template/Gemfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
+
ruby ">= 2.6.10"
|
|
5
|
+
|
|
6
|
+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
7
|
+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
8
|
+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
9
|
+
gem 'xcodeproj', '< 1.26.0'
|
|
10
|
+
gem 'concurrent-ruby', '< 1.3.4'
|
|
11
|
+
|
|
12
|
+
# Ruby 3.4.0 has removed some libraries from the standard library.
|
|
13
|
+
gem 'bigdecimal'
|
|
14
|
+
gem 'logger'
|
|
15
|
+
gem 'benchmark'
|
|
16
|
+
gem 'mutex_m'
|
|
17
|
+
|
|
18
|
+
gem 'thor', '>= 1.2'
|
|
19
|
+
gem 'abbrev'
|
|
20
|
+
gem 'fastlane'
|
|
21
|
+
|
|
22
|
+
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
|
|
23
|
+
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|