2
0
mirror of synced 2025-01-14 16:36:07 +00:00

Merge pull request #804 from lipis/prettier

Prettier json and md files as well
This commit is contained in:
chrisbianca 2018-02-01 12:10:38 +00:00 committed by GitHub
commit e3a00dd617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 141 additions and 177 deletions

View File

@ -14,27 +14,31 @@ The issue list of this repo is exclusively for bug reports.
<!--- Please write your issue here, provide as much detail as you can, code snippets, key files which will help us to debug such as your `Podfile` and/or `app/build.gradle` file). --> <!--- Please write your issue here, provide as much detail as you can, code snippets, key files which will help us to debug such as your `Podfile` and/or `app/build.gradle` file). -->
### Environment ### Environment
<!--- (e.g. iOS, Android, Both) ---> <!--- (e.g. iOS, Android, Both) --->
1. Application Target Platform:
1. Application Target Platform:
<!--- (e.g. macOS Sierra, Windows 10) ---> <!--- (e.g. macOS Sierra, Windows 10) --->
2. Development Operating System:
2. Development Operating System:
<!--- (Xcode or Android Studio version, iOS or Android SDK version - if relevant) ---> <!--- (Xcode or Android Studio version, iOS or Android SDK version - if relevant) --->
3. Build Tools:
3. Build Tools:
<!--- (e.g. 0.45.1) ---> <!--- (e.g. 0.45.1) --->
4. React Native version:
4. React Native version:
<!--- (e.g. 2.1.3) ---> <!--- (e.g. 2.1.3) --->
5. RNFirebase Version:
5. RNFirebase Version:
<!--- (e.g. database, auth, messaging, analytics etc - or N/A if not applicable) ---> <!--- (e.g. database, auth, messaging, analytics etc - or N/A if not applicable) --->
6. Firebase Module:
6. Firebase Module:
<!-- Love react-native-firebase? Please consider supporting our collective: <!-- Love react-native-firebase? Please consider supporting our collective:
👉 https://opencollective.com/react-native-firebase/donate --> 👉 https://opencollective.com/react-native-firebase/donate -->

View File

@ -4,16 +4,17 @@
First, thank you for considering contributing to react-native-firebase! It's people like you that make the open source community such a great community! 😊 First, thank you for considering contributing to react-native-firebase! It's people like you that make the open source community such a great community! 😊
We welcome any type of contribution, not only code. You can help with We welcome any type of contribution, not only code. You can help with
- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
- **Marketing**: writing blog posts, howto's, printing stickers, ... * **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ... * **Marketing**: writing blog posts, howto's, printing stickers, ...
- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them. * **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/react-native-firebase). * **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
* **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/react-native-firebase).
## Your First Contribution ## Your First Contribution
Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). Working on your first Pull Request? You can learn how from this _free_ series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
## Submitting code ## Submitting code
@ -41,14 +42,12 @@ You can also reach us at oss@invertase.io
Thank you to all the people who have already contributed to react-native-firebase! Thank you to all the people who have already contributed to react-native-firebase!
<a href="graphs/contributors"><img src="https://opencollective.com/react-native-firebase/contributors.svg?width=890" /></a> <a href="graphs/contributors"><img src="https://opencollective.com/react-native-firebase/contributors.svg?width=890" /></a>
### Backers ### Backers
Thank you to all our backers! [[Become a backer](https://opencollective.com/react-native-firebase#backer)] Thank you to all our backers! [[Become a backer](https://opencollective.com/react-native-firebase#backer)]
<a href="https://opencollective.com/react-native-firebase#backers" target="_blank"><img src="https://opencollective.com/react-native-firebase/backers.svg?width=890"></a> <a href="https://opencollective.com/react-native-firebase#backers" target="_blank"><img src="https://opencollective.com/react-native-firebase/backers.svg?width=890"></a>
### Sponsors ### Sponsors
Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/react-native-firebase#sponsor)) Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/react-native-firebase#sponsor))

View File

@ -30,43 +30,44 @@ All in all, RNFirebase provides much faster performance (~2x) over the web SDK a
--- ---
## Supported Firebase Features ## Supported Firebase Features
> The Web SDK column indicates what modules/functionality from the Web SDK are usable within React Native.
> The Web SDK column indicates what modules/functionality from the Web SDK are usable within React Native.
> '**?**' indicates partial support > '**?**' indicates partial support
| Firebase Features | v1.x.x | v2.x.x | v3.x.x | v3.1.x | v3.2.x | Web SDK | | Firebase Features | v1.x.x | v2.x.x | v3.x.x | v3.1.x | v3.2.x | Web SDK |
| ---------------------- | :---: | :---: | :---: | :---: | :---: | :---: | | -------------------------- | :----: | :----: | :----: | :----: | :----: | :-----: |
| **AdMob** | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **AdMob** | | | | | | |
| **Analytics**             | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **Analytics**             | | | | | | |
| **App Indexing**           | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **App Indexing**           | | | | | | |
| **Authentication** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **Authentication** | | | | | | |
| _-- Phone Auth_ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | _-- Phone Auth_ | | | | | | |
| **Core** | ❌ |**?**| ✅ | ✅ | ✅ | ✅ | | **Core** | | **?** | | | | |
| _-- Multiple Apps_ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | | _-- Multiple Apps_ | | | | | | |
| **Cloud Firestore** | ❌ | ❌ | ✅ | ✅ | ✅ |**?**| | **Cloud Firestore** | | | | | | **?** |
| **Cloud Messaging (FCM)** | ✅ | ✅ | ✅ | ✅ | ✅ |**?**| | **Cloud Messaging (FCM)** | | | | | | **?** |
| **Crashlytics**           | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | | **Crashlytics**           | | | | | | |
| **Crash Reporting** | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **Crash Reporting** | | | | | | |
| **Dynamic Links** | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | | **Dynamic Links** | | | | | | |
| **Invites** | ❌ | ❌ | ❌ |**?**|**?**| ❌ | | **Invites** | | | | **?** | **?** | |
| **Performance Monitoring** | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **Performance Monitoring** | | | | | | |
| **Realtime Database** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **Realtime Database** | | | | | | |
| _-- Offline Persistence_ | ✅ | ✅ | ✅ | ✅ | ✅ |**?**| | _-- Offline Persistence_ | | | | | | **?** |
| _-- Transactions_ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | _-- Transactions_ | | | | | | |
| **Remote Config** | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **Remote Config** | | | | | | |
| **Storage** | ✅ | ✅ | ✅ | ✅ | ✅ |**?**| | **Storage** | | | | | | **?** |
--- ---
### Supported versions - React Native / Firebase ### Supported versions - React Native / Firebase
> The table below shows the supported versions of React Native and the Firebase SDKs for different versions of `react-native-firebase` > The table below shows the supported versions of React Native and the Firebase SDKs for different versions of `react-native-firebase`
| | 1.X.X | 2.0.X | 2.1.X / 2.2.X | 3.0.X | 3.1.X | 3.2.X | | | 1.X.X | 2.0.X | 2.1.X / 2.2.X | 3.0.X | 3.1.X | 3.2.X |
|------------------------|-------------|-------------|-----------------|----------|-------------|----------| | -------------------- | ----------- | ----------- | ------------- | -------- | ----------- | -------- |
| React Native | 0.36 - 0.39 | 0.40 - 0.46 | 0.47 + | 0.48 + | 0.48 - 0.49 | 0.50 + | | React Native | 0.36 - 0.39 | 0.40 - 0.46 | 0.47 + | 0.48 + | 0.48 - 0.49 | 0.50 + |
| Firebase Android SDK | 10.2.0 + | 11.0.0 + | 11.0.0 + | 11.4.2 + | 11.6.0 + | 11.6.2 + | | Firebase Android SDK | 10.2.0 + | 11.0.0 + | 11.0.0 + | 11.4.2 + | 11.6.0 + | 11.6.2 + |
| Firebase iOS SDK | 3.15.0 + | 4.0.0 + | 4.0.0 + | 4.3.0 + | 4.5.0 + | 4.7.0 + | | Firebase iOS SDK | 3.15.0 + | 4.0.0 + | 4.0.0 + | 4.3.0 + | 4.5.0 + | 4.7.0 + |
--- ---
@ -96,7 +97,7 @@ Detailed changes for each release are documented in the [releases notes](https:/
RNFirebase is an Apache-2.0 licensed open source project. It's an independent project with its ongoing development made possible entirely thanks to the support by these awesome [sponsors](#sponsors) and [backers](#backers). If you'd like to join them, please consider: RNFirebase is an Apache-2.0 licensed open source project. It's an independent project with its ongoing development made possible entirely thanks to the support by these awesome [sponsors](#sponsors) and [backers](#backers). If you'd like to join them, please consider:
- [Become a backer or sponsor on Open Collective](https://opencollective.com/react-native-firebase). * [Become a backer or sponsor on Open Collective](https://opencollective.com/react-native-firebase).
### Sponsors ### Sponsors
@ -131,4 +132,4 @@ Thank you to all the people who have already contributed to RNFirebase!
## License ## License
- See [LICENSE](/LICENSE) * See [LICENSE](/LICENSE)

View File

@ -1,9 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true
}, },
"exclude": [ "exclude": ["node_modules"]
"node_modules" }
]
}

View File

@ -11,7 +11,8 @@
"build-lib": "BABEL_ENV=publish babel lib -d dist --ignore __tests__ --copy-files", "build-lib": "BABEL_ENV=publish babel lib -d dist --ignore __tests__ --copy-files",
"clean": "rimraf dist/", "clean": "rimraf dist/",
"flow": "flow", "flow": "flow",
"format": "npm run lint -- --fix", "format:assets": "prettier --ignore-path .gitignore --write \"**/*.{json,md}\"",
"format": "npm run format:assets && npm run lint -- --fix",
"lint": "eslint ./lib ./tests/src ./tests/lib", "lint": "eslint ./lib ./tests/src ./tests/lib",
"precommit": "lint-staged", "precommit": "lint-staged",
"prepublish": "npm run clean && npm run build", "prepublish": "npm run clean && npm run build",
@ -31,45 +32,10 @@
"jest": { "jest": {
"preset": "jest-react-native", "preset": "jest-react-native",
"setupFiles": [], "setupFiles": [],
"unmockedModulePathPatterns": [ "unmockedModulePathPatterns": ["./node_modules/react", "./node_modules/react-native", "./node_modules/react-native-mock", "./node_modules/react-addons-test-utils"]
"./node_modules/react",
"./node_modules/react-native",
"./node_modules/react-native-mock",
"./node_modules/react-addons-test-utils"
]
}, },
"license": "APACHE-2.0", "license": "APACHE-2.0",
"keywords": [ "keywords": ["react", "admob", "auth", "config", "digits", "phone-auth", "sms", "firestore", "cloud-firestore", "datastore", "remote-config", "transactions", "react-native", "react-native-firebase", "firebase", "fcm", "apn", "gcm", "analytics", "messaging", "database", "android", "ios", "crash", "firestack", "performance", "firestore", "dynamic-links", "crashlytics"],
"react",
"admob",
"auth",
"config",
"digits",
"phone-auth",
"sms",
"firestore",
"cloud-firestore",
"datastore",
"remote-config",
"transactions",
"react-native",
"react-native-firebase",
"firebase",
"fcm",
"apn",
"gcm",
"analytics",
"messaging",
"database",
"android",
"ios",
"crash",
"firestack",
"performance",
"firestore",
"dynamic-links",
"crashlytics"
],
"peerDependencies": { "peerDependencies": {
"react": "*", "react": "*",
"react-native": ">= 0.48.0", "react-native": ">= 0.48.0",
@ -127,13 +93,8 @@
"logo": "https://opencollective.com/opencollective/logo.txt" "logo": "https://opencollective.com/opencollective/logo.txt"
}, },
"lint-staged": { "lint-staged": {
"lib/**/*.js": [ "lib/**/*.js": ["eslint --fix", "git add"],
"eslint --fix", "tests/{src|lib}/**/*.js": ["eslint --fix", "git add"],
"git add" "*.{json,md,scss}": ["prettier --write", "git add"]
],
"tests/{src|lib}/**/*.js": [
"eslint --fix",
"git add"
]
} }
} }

View File

@ -1,4 +1,12 @@
module.exports = { module.exports = {
trailingComma: 'es5', trailingComma: 'es5',
singleQuote: true, singleQuote: true,
overrides: [
{
files: '*.json',
options: {
printWidth: 400,
},
},
],
}; };

View File

@ -1,79 +1,79 @@
{ {
"images" : [ "images": [
{ {
"size" : "20x20", "size": "20x20",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-20@2x.png", "filename": "Icon-20@2x.png",
"scale" : "2x" "scale": "2x"
}, },
{ {
"size" : "20x20", "size": "20x20",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-20@3x.png", "filename": "Icon-20@3x.png",
"scale" : "3x" "scale": "3x"
}, },
{ {
"size" : "29x29", "size": "29x29",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-29.png", "filename": "Icon-29.png",
"scale" : "1x" "scale": "1x"
}, },
{ {
"size" : "29x29", "size": "29x29",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-29@2x.png", "filename": "Icon-29@2x.png",
"scale" : "2x" "scale": "2x"
}, },
{ {
"size" : "29x29", "size": "29x29",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-29@3x.png", "filename": "Icon-29@3x.png",
"scale" : "3x" "scale": "3x"
}, },
{ {
"size" : "40x40", "size": "40x40",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-40@2x.png", "filename": "Icon-40@2x.png",
"scale" : "2x" "scale": "2x"
}, },
{ {
"size" : "40x40", "size": "40x40",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-40@3x.png", "filename": "Icon-40@3x.png",
"scale" : "3x" "scale": "3x"
}, },
{ {
"size" : "57x57", "size": "57x57",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-57.png", "filename": "Icon-57.png",
"scale" : "1x" "scale": "1x"
}, },
{ {
"size" : "57x57", "size": "57x57",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-57@2x.png", "filename": "Icon-57@2x.png",
"scale" : "2x" "scale": "2x"
}, },
{ {
"size" : "60x60", "size": "60x60",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-60@2x.png", "filename": "Icon-60@2x.png",
"scale" : "2x" "scale": "2x"
}, },
{ {
"size" : "60x60", "size": "60x60",
"idiom" : "iphone", "idiom": "iphone",
"filename" : "Icon-60@3x.png", "filename": "Icon-60@3x.png",
"scale" : "3x" "scale": "3x"
}, },
{ {
"idiom" : "ios-marketing", "idiom": "ios-marketing",
"size" : "1024x1024", "size": "1024x1024",
"scale" : "1x" "scale": "1x"
} }
], ],
"info" : { "info": {
"version" : 1, "version": 1,
"author" : "xcode" "author": "xcode"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"info" : { "info": {
"version" : 1, "version": 1,
"author" : "xcode" "author": "xcode"
} }
} }

View File

@ -1,25 +1,18 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "commonjs", "module": "commonjs",
"jsx": "react", "jsx": "react",
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"moduleResolution": "node", "moduleResolution": "node",
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"lib": [ "lib": ["es2015", "es2016", "esnext", "dom"]
"es2015",
"es2016",
"esnext",
"dom"
]
}, },
"files": [ "files": ["./lib/index.d.ts"]
"./lib/index.d.ts"
]
} }