Skip to content

Commit

Permalink
feat: New API with full backward compatibility (react-native-netinfo#84)
Browse files Browse the repository at this point in the history
See the README for full details.

BREAKING CHANGE
  • Loading branch information
matt-oakes committed May 15, 2019
1 parent e72c5a0 commit e2849df
Show file tree
Hide file tree
Showing 75 changed files with 2,846 additions and 1,381 deletions.
29 changes: 11 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
rn: react-native-community/react-native@1.0.0
rn: react-native-community/react-native@1.2.0

jobs:
checkout_code:
Expand All @@ -20,21 +20,12 @@ jobs:
- run:
name: Lint JS Code (ESLint)
command: yarn run validate:eslint
- run:
name: Flow
command: yarn run validate:flow
- run:
name: TypeScript
command: yarn run validate:typescript
- run:
name: Jest
command: yarn run test:jest
- run:
name: Build Android JavaScript Bundle
command: yarn run test:detox:android:bundle:release
- run:
name: Build iOS JavaScript Bundle
command: yarn run test:detox:ios:bundle:release
publish:
executor: rn/linux_js
steps:
Expand All @@ -58,17 +49,19 @@ workflows:
build_type: debug
requires:
- analyse
- rn/android_build:
name: build_android_release
project_path: "example/android"
build_type: release
requires:
- analyse
# Disabled until we can get a handle on the memory issues
# - rn/android_build:
# name: build_android_release
# project_path: "example/android"
# build_type: release
# requires:
# - analyse
- rn/android_test:
detox_configuration: "android.emu.release"
start_metro: true
detox_configuration: "android.emu.debug"
detox_loglevel: "trace"
requires:
- build_android_release
- build_android_debug
- rn/ios_build_and_test:
project_path: "example/ios/NetInfoExample.xcodeproj"
derived_data_path: "example/ios/build"
Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ typings
node_modules
example/android-bundle.js
example/ios-bundle.js

# generated by bob
lib/
47 changes: 46 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
module.exports = { extends: "@react-native-community" };
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/

const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.json');
const typescriptEslintPrettier = require('eslint-config-prettier/@typescript-eslint');

module.exports = {
extends: ['@react-native-community'],
overrides: [
{
files: ['*.ts', '*.tsx'],
// Apply the recommended Typescript defaults and the prettier overrides to all Typescript files
rules: Object.assign(
typescriptEslintRecommended.rules,
typescriptEslintPrettier.rules,
{
'@typescript-eslint/explicit-member-accessibility': 'off',
},
),
},
{
files: ['example/**/*.ts', 'example/**/*.tsx'],
rules: {
// Turn off rules which are useless and annoying for the example files files
'@typescript-eslint/explicit-function-return-type': 'off',
'react-native/no-inline-styles': 'off',
},
},
{
files: ['**/__tests__/**/*.ts', '**/*.spec.ts'],
env: {
jest: true,
},
rules: {
// Turn off rules which are useless and annoying for unit test files
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
],
};
93 changes: 0 additions & 93 deletions .flowconfig

This file was deleted.

5 changes: 2 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"parser": "flow"
}
"jsxBracketSameLine": true
}
Loading

0 comments on commit e2849df

Please sign in to comment.