Skip to content

Commit c41dcea

Browse files
committed
Version 1.0.0 is here with Typescript support
1 parent 0bf45dc commit c41dcea

File tree

13 files changed

+17014
-131
lines changed

13 files changed

+17014
-131
lines changed

.eslintrc.js

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,77 @@
11
module.exports = {
2-
parser: "babel-eslint",
3-
extends: "airbnb",
4-
plugins: ["react", "react-native"],
5-
env: {
6-
jest: true,
7-
"react-native/react-native": true
2+
root: true,
3+
extends: "@react-native-community",
4+
parser: "@typescript-eslint/parser",
5+
plugins: ["import", "eslint-plugin-import", "@typescript-eslint"],
6+
settings: {
7+
"import/resolver": {
8+
node: {
9+
extensions: [
10+
".js",
11+
".jsx",
12+
".ts",
13+
".tsx",
14+
".d.ts",
15+
".android.js",
16+
".android.jsx",
17+
".android.ts",
18+
".android.tsx",
19+
".ios.js",
20+
".ios.jsx",
21+
".ios.ts",
22+
".ios.tsx",
23+
".web.js",
24+
".web.jsx",
25+
".web.ts",
26+
".web.tsx",
27+
],
28+
},
29+
},
830
},
931
rules: {
10-
// allow js file extension
11-
"react/jsx-filename-extension": [
32+
quotes: [
1233
"error",
34+
"double",
1335
{
14-
extensions: [".js", ".jsx"]
15-
}
36+
avoidEscape: true,
37+
},
1638
],
17-
// for post defining style object in react-native
18-
"no-use-before-define": ["error", { variables: false }],
19-
// react-native rules
39+
"max-len": ["error", 120],
40+
"@typescript-eslint/ban-ts-comment": 2,
41+
"@typescript-eslint/no-explicit-any": 2,
42+
"@typescript-eslint/explicit-module-boundary-types": 0,
43+
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
2044
"react-native/no-unused-styles": 2,
2145
"react-native/split-platform-components": 2,
22-
"react-native/no-inline-styles": 2,
23-
"react-native/no-raw-text": 2
24-
}
46+
"react-native/no-inline-styles": 0,
47+
"react-native/no-color-literals": 0,
48+
"react-native/no-raw-text": 0,
49+
"import/no-extraneous-dependencies": 2,
50+
"import/extensions": ["error", "never", { svg: "always" }],
51+
"import/no-named-as-default-member": 2,
52+
"import/order": ["error", { "newlines-between": "always" }],
53+
"import/no-duplicates": 2,
54+
"import/no-useless-path-segments": 2,
55+
"import/no-cycle": 2,
56+
"import/prefer-default-export": 0,
57+
"import/no-anonymous-default-export": 0,
58+
"import/named": 0,
59+
"@typescript-eslint/no-empty-interface": 0,
60+
"import/namespace": 0,
61+
"import/default": 0,
62+
"import/no-named-as-default": 0,
63+
"import/no-unused-modules": 0,
64+
"import/no-deprecated": 0,
65+
"@typescript-eslint/indent": 0,
66+
"react-hooks/rules-of-hooks": 2,
67+
"react-hooks/exhaustive-deps": [
68+
"error",
69+
{ additionalHooks: "(useMemoOne)" },
70+
],
71+
"jest/no-identical-title": 2,
72+
"jest/valid-expect": 2,
73+
camelcase: 2,
74+
"prefer-destructuring": 2,
75+
"no-nested-ternary": 2,
76+
},
2577
};

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
#
33
.DS_Store
44

5-
package-lock.json
6-
7-
node_modules
8-
95
# Xcode
106
#
117
build/
@@ -24,7 +20,6 @@ DerivedData
2420
*.hmap
2521
*.ipa
2622
*.xcuserstate
27-
project.xcworkspace
2823

2924
# Android/IntelliJ
3025
#
@@ -34,6 +29,10 @@ build/
3429
local.properties
3530
*.iml
3631

32+
# Visual Studio Code
33+
#
34+
.vscode/
35+
3736
# node.js
3837
#
3938
node_modules/
@@ -44,6 +43,7 @@ yarn-error.log
4443
buck-out/
4544
\.buckd/
4645
*.keystore
46+
!debug.keystore
4747

4848
# fastlane
4949
#
@@ -58,3 +58,6 @@ buck-out/
5858

5959
# Bundle artifact
6060
*.jsbundle
61+
62+
# CocoaPods
63+
/ios/Pods/

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
bracketSpacing: true,
3+
jsxBracketSameLine: false,
4+
singleQuote: false,
5+
trailingComma: "all",
6+
tabWidth: 2,
7+
semi: true,
8+
};

.watchmanconfig

Lines changed: 0 additions & 1 deletion
This file was deleted.

babel.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/App.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { StatusBar } from "react-native";
44
import { NavigationContainer } from "@react-navigation/native";
55
import { createStackNavigator } from "@react-navigation/stack";
66
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
7-
8-
import { isReadyRef, navigationRef } from "./lib/src/NavigationService";
7+
import { isReadyRef, navigationRef } from "react-navigation-helpers";
98

109
// ? Screens
1110
import HomeScreen from "./screens/HomeScreen";

example/lib/src/NavigationService.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)