forked from sevvaleygul0/react-native-language-select
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b4c48d6
Showing
81 changed files
with
15,176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"], | ||
"rules": { | ||
"header-max-length": [0, "always", 150], | ||
"subject-case": [0, "always", "sentence-case"], | ||
"type-enum": [ | ||
2, | ||
"always", | ||
[ | ||
"ci", | ||
"chore", | ||
"docs", | ||
"feat", | ||
"fix", | ||
"perf", | ||
"refactor", | ||
"revert", | ||
"style", | ||
"test" | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"@react-native-community", | ||
"prettier", | ||
], | ||
ignorePatterns: [ | ||
"**/*/*.js", | ||
"*.js", | ||
"*.svg", | ||
"*.json", | ||
"*.png", | ||
"package.json", | ||
"package-lock.json", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
plugins: [ | ||
"import", | ||
"react", | ||
"react-native", | ||
"prettier", | ||
"react-hooks", | ||
"@typescript-eslint", | ||
"promise", | ||
"jest", | ||
"unused-imports", | ||
], | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
"jest/globals": true, | ||
"react-native/react-native": true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [ | ||
".js", | ||
".jsx", | ||
".ts", | ||
".tsx", | ||
".d.ts", | ||
".android.js", | ||
".android.jsx", | ||
".android.ts", | ||
".android.tsx", | ||
".ios.js", | ||
".ios.jsx", | ||
".ios.ts", | ||
".ios.tsx", | ||
".web.js", | ||
".web.jsx", | ||
".web.ts", | ||
".web.tsx", | ||
], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
quotes: [ | ||
"error", | ||
"double", | ||
{ | ||
avoidEscape: true, | ||
}, | ||
], | ||
"import/extensions": [ | ||
"error", | ||
"never", | ||
{ | ||
svg: "always", | ||
model: "always", | ||
style: "always", | ||
png: "always", | ||
jpg: "always", | ||
json: "always", | ||
constant: "always", | ||
}, | ||
], | ||
"no-useless-catch": 0, | ||
"react-hooks/exhaustive-deps": 0, | ||
"max-len": ["error", 120], | ||
"@typescript-eslint/ban-ts-comment": 1, | ||
"@typescript-eslint/no-empty-function": 0, | ||
"@typescript-eslint/no-explicit-any": 1, | ||
"@typescript-eslint/explicit-module-boundary-types": 0, | ||
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }], | ||
"react-native/no-unused-styles": 2, | ||
"react-native/split-platform-components": 2, | ||
"react-native/no-inline-styles": 0, | ||
"react-native/no-color-literals": 0, | ||
"react-native/no-raw-text": 0, | ||
"import/no-extraneous-dependencies": 2, | ||
"import/no-named-as-default-member": 2, | ||
"import/order": 0, | ||
"import/no-duplicates": 2, | ||
"import/no-useless-path-segments": 2, | ||
"import/no-cycle": 2, | ||
"import/prefer-default-export": 0, | ||
"import/no-anonymous-default-export": 0, | ||
"import/named": 0, | ||
"@typescript-eslint/no-empty-interface": 0, | ||
"import/namespace": 0, | ||
"import/default": 0, | ||
"import/no-named-as-default": 0, | ||
"import/no-unused-modules": 0, | ||
"import/no-deprecated": 0, | ||
"@typescript-eslint/indent": 0, | ||
"react-hooks/rules-of-hooks": 2, | ||
camelcase: 2, | ||
"prefer-destructuring": 2, | ||
"no-nested-ternary": 2, | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
endOfLine: "auto", | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pbxproj -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
|
||
# Visual Studio Code | ||
# | ||
.vscode/ | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
!debug.keystore | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/ | ||
|
||
*/fastlane/report.xml | ||
*/fastlane/Preview.html | ||
*/fastlane/screenshots | ||
|
||
# Bundle artifact | ||
*.jsbundle | ||
|
||
# CocoaPods | ||
/ios/Pods/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Node Modules | ||
**/node_modules | ||
node_modules | ||
# Example | ||
example | ||
# Assets | ||
Assets | ||
assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"singleQuote": false, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<img alt="React Native Typescript Library Starter" src="assets/logo.png" width="1050"/> | ||
|
||
[](https://github.com/WrathChaos/react-native-typescript-library-starter) | ||
|
||
[](https://github.com/WrathChaos/react-native-typescript-library-starter) | ||
|
||
[](https://www.npmjs.com/package/react-native-typescript-library-starter) | ||
[](https://www.npmjs.com/package/react-native-typescript-library-starter) | ||
 | ||
[](https://opensource.org/licenses/MIT) | ||
[](https://github.com/prettier/prettier) | ||
|
||
<p align="center"> | ||
<img alt="React Native Typescript Library Starter" | ||
src="assets/Screenshots/typescript.jpg" /> | ||
</p> | ||
|
||
## Library Usage | ||
|
||
- `npm i` | ||
- `npm run husky:setup` | ||
- Delete example folder | ||
- Delete build folder | ||
- Make your own library into the `lib` folder | ||
- Change package.json | ||
- Change README for your own documentation | ||
- `npm run build` | ||
|
||
``` | ||
> [email protected] build /Users/kuray/Coursion/MyLibraries/ReactNative/react-native-typescript-library-starter | ||
> cd lib && tsc && cp ../package.json ../build/dist/ && Echo Build completed! | ||
Build completed! | ||
``` | ||
|
||
- Test your build/dist into the new project | ||
- Finally, time to npm publish :) | ||
|
||
### Below part is for Documentation ! Remove above Library Usage | ||
|
||
# Installation | ||
|
||
Add the dependency: | ||
|
||
```bash | ||
npm i react-native-typescript-library-starter | ||
``` | ||
|
||
## Peer Dependencies | ||
|
||
<h5><i>IMPORTANT! You need install them</i></h5> | ||
|
||
```js | ||
"react": ">= 16.x.x", | ||
"react-native": ">= 0.55.x", | ||
``` | ||
|
||
# Usage | ||
|
||
## Import | ||
|
||
```jsx | ||
import MyComponent from "react-native-typescript-library-starter"; | ||
``` | ||
|
||
## Fundamental Usage | ||
|
||
```jsx | ||
<MyComponent /> | ||
``` | ||
|
||
## Example Project 😍 | ||
|
||
You can checkout the example project 🥰 | ||
|
||
Simply run | ||
|
||
- `npm i` | ||
- `react-native run-ios/android` | ||
|
||
should work of the example project. | ||
|
||
# Configuration - Props | ||
|
||
## Fundamentals | ||
|
||
| Property | Type | Default | Description | | ||
| ----------- | :----: | :-------: | --------------------- | | ||
| title | string | undefined | change the title | | ||
| description | string | undefined | change the descrition | | ||
|
||
## Customization (Optionals) | ||
|
||
| Property | Type | Default | Description | | ||
| -------------- | :-------: | :-------: | ---------------------------------------------------------------------- | | ||
| enableButton | boolean | false | let you enable the button (must use it for button) | | ||
| onPress | function | undefined | set your own logic for the button functionality when it is pressed | | ||
| buttonText | string | undefined | change the button's text | | ||
| style | ViewStyle | default | set or override the style object for the main container | | ||
| buttonStyle | ViewStyle | default | set or override the style object for the button style | | ||
| ImageComponent | Image | default | set your own component instead of default react-native Image component | | ||
|
||
## Future Plans | ||
|
||
- [x] ~~LICENSE~~ | ||
- [ ] Write an article about the lib on Medium | ||
|
||
# Change Log | ||
|
||
Change log will be here ! | ||
|
||
## Author | ||
|
||
FreakyCoder, [email protected] | ||
|
||
## License | ||
|
||
React Native Typescript Library Starter is available under the MIT license. See the LICENSE file for more info. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[android] | ||
target = Google Inc.:Google APIs:23 | ||
|
||
[maven_repositories] | ||
central = https://repo1.maven.org/maven2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: '@react-native-community', | ||
}; |
Oops, something went wrong.