Skip to content

Commit

Permalink
Moved react-native entry point to fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Nov 25, 2021
1 parent 15e36a9 commit 164b237
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions lib/react-native/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"@react-native-community",
"../../.eslintrc"
]
}
6 changes: 2 additions & 4 deletions lib/react-native.js → lib/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
//
////////////////////////////////////////////////////////////////////////////

// eslint sourceType: module

import { Platform, NativeModules } from "react-native";

//switch how babel transpiled code creates children objects.
Expand All @@ -42,9 +40,9 @@ if (typeof global.Realm === "undefined") {
);
}

require("./extensions")(global.Realm);
require("../extensions")(global.Realm);

const utils = require("./utils");
const utils = require("../utils");
const versions = utils.getVersions();
global.Realm.App._setVersions(versions);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"types": "types/index.d.ts",
"main": "lib/index.js",
"react-native": "lib/react-native.js",
"react-native": "lib/react-native/index.js",
"files": [
"cmake",
"lib",
Expand Down

0 comments on commit 164b237

Please sign in to comment.