Skip to content

Commit 961a6e2

Browse files
author
cnilton
committed
PR review, function names fixed, testing fixed
1 parent 7fc6987 commit 961a6e2

File tree

13 files changed

+2582
-47
lines changed

13 files changed

+2582
-47
lines changed

.eslintrc.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
},
66
"extends": [
77
"plugin:react/recommended",
8-
"airbnb",
98
"plugin:@typescript-eslint/recommended"
109
],
1110
"globals": {
@@ -21,11 +20,11 @@
2120
"ecmaVersion": 2018,
2221
"sourceType": "module"
2322
},
24-
"plugins": ["react", "react-hooks", "@typescript-eslint"],
23+
"plugins": ["react", "react-hooks", "@typescript-eslint", "import"],
2524
"rules": {
2625
"react-hooks/rules-of-hooks": "error",
2726
"react-hooks/exhaustive-deps": "warn",
28-
"react/jsx-filename-extension": [1, {"extensions": [".tsx"]}],
27+
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
2928
"import/prefer-default-export": "off",
3029
"import/extensions": [
3130
"error",
@@ -38,7 +37,9 @@
3837
},
3938
"settings": {
4039
"import/resolver": {
41-
"typescript": {}
40+
"node": {
41+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
42+
}
4243
}
4344
}
4445
}

__tests__/App-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../app.js';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

android/.project

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>react-native-floating-label-input</name>
4+
<comment>Project android created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16+
</natures>
17+
<filteredResources>
18+
<filter>
19+
<id>0</id>
20+
<name></name>
21+
<type>30</type>
22+
<matcher>
23+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
24+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25+
</matcher>
26+
</filter>
27+
</filteredResources>
28+
</projectDescription>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
arguments=
2+
auto.sync=false
3+
build.scans.enabled=false
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5+
connection.project.dir=
6+
eclipse.preferences.version=1
7+
gradle.user.home=
8+
java.home=C\:/Program Files/OpenJDK/openjdk-11.0.12_7
9+
jvm.arguments=
10+
offline.mode=false
11+
override.workspace.settings=true
12+
show.console.view=true
13+
show.executions.view=true

android/app/.classpath

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
4+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5+
<classpathentry kind="output" path="bin/default"/>
6+
</classpath>

android/app/.project

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>app</name>
4+
<comment>Project app created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>1637506096689</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
34+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = {
22
presets: ['module:metro-react-native-babel-preset'],
3+
plugins: ['react-native-reanimated/plugin'],
34
};

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module.exports = {
22
preset: 'react-native',
3+
setupFilesAfterEnv: ['./jest.setup.js'],
34
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', 'png'],
5+
transformIgnorePatterns: [
6+
'node_modules/(?!(@react-native|react-native|react-native-reanimated)/)',
7+
],
48
};

jest.setup.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter');
2+
jest.mock('react-native-reanimated', () =>
3+
require('react-native-reanimated/mock'),
4+
);
5+
// jest.mock('react-native-reanimated', () => {
6+
// const View = require('react-native').View;
7+
8+
// return {
9+
// Value: jest.fn(),
10+
// event: jest.fn(),
11+
// add: jest.fn(),
12+
// eq: jest.fn(),
13+
// set: jest.fn(),
14+
// cond: jest.fn(),
15+
// interpolate: jest.fn(),
16+
// View: View,
17+
// Extrapolate: { CLAMP: jest.fn() },
18+
// Transition: {
19+
// Together: 'Together',
20+
// Out: 'Out',
21+
// In: 'In',
22+
// },
23+
// };
24+
// });

0 commit comments

Comments
 (0)