Skip to content

Commit f2f6a73

Browse files
committed
updates & changes
Updated packages, info and version Updated eslint/flow config Merged PR AppAndFlow#21, PR AppAndFlow#22 and PR AppAndFlow#24
1 parent 0858210 commit f2f6a73

File tree

6 files changed

+217
-97
lines changed

6 files changed

+217
-97
lines changed

.eslintrc

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

.eslintrc.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = {
2+
"env": {
3+
"es6": true,
4+
"react-native/react-native": true
5+
},
6+
"extends": [
7+
"airbnb",
8+
"eslint:recommended",
9+
"anf"
10+
],
11+
"globals": {
12+
"Atomics": "readonly",
13+
"SharedArrayBuffer": "readonly"
14+
},
15+
'parser': 'babel-eslint',
16+
"parserOptions": {
17+
"ecmaFeatures": {
18+
"jsx": true
19+
},
20+
"ecmaVersion": 2018,
21+
"sourceType": "module"
22+
},
23+
"plugins": [
24+
"react",
25+
"react-native"
26+
],
27+
"rules": {
28+
"react/forbid-prop-types": [0, { "forbid": ["any", "array", "object"] }],
29+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
30+
"react/prop-types": 0,
31+
"no-use-before-define": ["error", { "variables": false }] // Temporarily disable this. See https://github.com/Intellicode/eslint-plugin-react-native/issues/22
32+
}
33+
};

.flowconfig

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,93 @@
77

88
; Ignore unexpected extra "@providesModule"
99
.*/node_modules/.*/node_modules/fbjs/.*
10-
.*/node_modules/react-native/RNTester/.*
1110

1211
; Ignore duplicate module providers
1312
; For RN Apps installed via npm, "Libraries" folder is inside
1413
; "node_modules/react-native" but in the source repo it is in the root
15-
.*/Libraries/react-native/React.js
16-
.*/Libraries/react-native/ReactNative.js
14+
node_modules/react-native/Libraries/react-native/React.js
1715

18-
<PROJECT_ROOT>/\example/
16+
; Ignore polyfills
17+
node_modules/react-native/Libraries/polyfills/.*
18+
19+
; These should not be required directly
20+
; require from fbjs/lib instead: require('fbjs/lib/warning')
21+
node_modules/warning/.*
22+
23+
; Flow doesn't support platforms
24+
.*/Libraries/Utilities/HMRLoadingView.js
25+
26+
[untyped]
27+
.*/node_modules/@react-native-community/cli/.*/.*
1928

2029
[include]
2130

2231
[libs]
2332
node_modules/react-native/Libraries/react-native/react-native-interface.js
24-
node_modules/react-native/flow
33+
node_modules/react-native/flow/
2534

2635
[options]
2736
emoji=true
2837

29-
module.system=haste
38+
esproposal.optional_chaining=enable
39+
esproposal.nullish_coalescing=enable
3040

31-
experimental.strict_type_args=true
41+
module.file_ext=.js
42+
module.file_ext=.json
43+
module.file_ext=.ios.js
3244

33-
esproposal.decorators=ignore
34-
esproposal.class_static_fields=enable
35-
esproposal.class_instance_fields=enable
45+
module.system=haste
46+
module.system.haste.use_name_reducers=true
47+
# get basename
48+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
49+
# strip .js or .js.flow suffix
50+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
51+
# strip .ios suffix
52+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
53+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
54+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
55+
module.system.haste.paths.blacklist=.*/__tests__/.*
56+
module.system.haste.paths.blacklist=.*/__mocks__/.*
57+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
58+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
59+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
60+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
61+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
3662

3763
munge_underscores=true
3864

39-
module.file_ext=.ios.js
40-
module.file_ext=.js
41-
module.file_ext=.jsx
42-
module.file_ext=.json
4365
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
4466

4567
suppress_type=$FlowIssue
4668
suppress_type=$FlowFixMe
47-
suppress_type=$FixMe
48-
4969
suppress_type=$FlowFixMeProps
5070
suppress_type=$FlowFixMeState
51-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
53-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
71+
72+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
5474
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5575

56-
unsafe.enable_getters_and_setters=true
76+
[lints]
77+
sketchy-null-number=warn
78+
sketchy-null-mixed=warn
79+
sketchy-number=warn
80+
untyped-type-import=warn
81+
nonstrict-import=warn
82+
deprecated-type=warn
83+
unsafe-getters-setters=warn
84+
inexact-spread=warn
85+
unnecessary-invariant=warn
86+
signature-verification-failure=warn
87+
deprecated-utility=error
88+
89+
[strict]
90+
deprecated-type
91+
nonstrict-import
92+
sketchy-null
93+
unclear-type
94+
unsafe-getters-setters
95+
untyped-import
96+
untyped-type-import
5797

5898
[version]
59-
^0.53.0
99+
^0.102.0

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules/
1+
node_modules/
2+
package-lock.json

package.json

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
{
2-
"name": "@appandflow/masonry-list",
2+
"name": "@fisherwise/masonry-list",
33
"version": "0.4.0",
44
"main": "./src/MasonryList.js",
55
"private": false,
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/AppAndFlow/react-native-masonry-list.git"
8+
"url": "https://github.com/fisherwise/react-native-masonry-list.git"
99
},
1010
"bugs": {
11-
"url": "https://github.com/AppAndFlow/react-native-masonry-list.git/issues"
11+
"url": "https://github.com/fisherwise/react-native-masonry-list.git/issues"
1212
},
1313
"keywords": [
1414
"react-native",
15-
"appandflow",
1615
"masonry",
1716
"list"
1817
],
@@ -21,6 +20,7 @@
2120
"files": [
2221
"/src"
2322
],
23+
"lint": "eslint src",
2424
"lint-staged": {
2525
"*.js": [
2626
"yarn prettier",
@@ -45,21 +45,25 @@
4545
"react": "*"
4646
},
4747
"devDependencies": {
48-
"babel-preset-react-native": "^3.0.1",
49-
"chalk": "^2.1.0",
50-
"eslint": "^4.5.0",
51-
"eslint-config-anf": "^0.5.2",
52-
"eslint-config-prettier": "^2.3.0",
53-
"flow-bin": "^0.53.1",
54-
"glob": "^7.1.2",
55-
"husky": "^0.14.3",
56-
"jest": "^20.0.4",
57-
"jest-expo": "^20.0.0",
58-
"lint-staged": "^4.0.3",
59-
"prettier": "^1.5.3",
60-
"react": "16.0.0-beta.5",
61-
"react-native": "janicduplessis/react-native",
62-
"react-test-renderer": "16.0.0-beta.5"
48+
"babel-preset-react-native": "^4.0.1",
49+
"chalk": "^2.4.2",
50+
"core-js": "^3.1.4",
51+
"eslint": "^6.0.1",
52+
"eslint-config-airbnb": "^17.1.1",
53+
"eslint-config-anf": "^0.6.2",
54+
"eslint-config-prettier": "^6.0.0",
55+
"eslint-plugin-react": "^7.14.2",
56+
"eslint-plugin-react-native": "^3.7.0",
57+
"flow-bin": "^0.102.0",
58+
"glob": "^7.1.4",
59+
"husky": "^3.0.0",
60+
"jest": "^24.8.0",
61+
"jest-expo": "^33.0.2",
62+
"lint-staged": "^9.2.0",
63+
"prettier": "^1.18.2",
64+
"react": "16.8.6",
65+
"react-native": "0.60.3",
66+
"react-test-renderer": "16.8.6"
6367
},
6468
"dependencies": {}
6569
}

0 commit comments

Comments
 (0)