Skip to content

Commit 8cc8dd5

Browse files
authored
Merge pull request #28 from karl-run/chore/v3
Version 4
2 parents c498632 + 56790d7 commit 8cc8dd5

21 files changed

+9923
-9684
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
dist/
3+
node_modules/
4+
.snapshots/
5+
*.min.js

.eslintrc

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
{
22
"parser": "@typescript-eslint/parser",
33
"extends": [
4-
"plugin:@typescript-eslint/recommended",
5-
"prettier/@typescript-eslint",
4+
"standard",
5+
"standard-react",
66
"plugin:prettier/recommended",
7-
"plugin:react/recommended",
8-
"plugin:jsx-a11y/recommended"
7+
"prettier/standard",
8+
"prettier/react",
9+
"plugin:@typescript-eslint/eslint-recommended"
910
],
10-
"plugins": ["@typescript-eslint", "react", "react-hooks", "jsx-a11y"],
11-
"rules": {
12-
"@typescript-eslint/explicit-function-return-type": "off",
13-
"react-hooks/rules-of-hooks": "error",
14-
"react-hooks/exhaustive-deps": "warn"
11+
"env": {
12+
"node": true
1513
},
1614
"parserOptions": {
17-
"ecmaVersion": 2018,
18-
"sourceType": "module",
15+
"ecmaVersion": 2020,
1916
"ecmaFeatures": {
17+
"legacyDecorators": true,
2018
"jsx": true
2119
}
2220
},
2321
"settings": {
2422
"react": {
25-
"version": "detect"
23+
"version": "16"
2624
}
25+
},
26+
"rules": {
27+
"space-before-function-paren": 0,
28+
"react/prop-types": 0,
29+
"react/jsx-handler-names": 0,
30+
"react/jsx-fragments": 0,
31+
"react/no-unused-prop-types": 0,
32+
"import/export": 0
2733
}
2834
}

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: node_js
22
node_js:
3-
- 9
4-
- 8
3+
- 12
4+
- 10

example/.env

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

example/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Example for react-bottom-scroll-listener
1+
This example was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
22

3-
Install dependencies: `yarn`
4-
Start development server: `yarn start`
3+
It is linked to the react-bottom-scroll-listener-2 package in the parent directory for development purposes.
4+
5+
You can run `yarn install` and then `yarn start` to test your package.

example/package.json

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,25 @@
55
"license": "MIT",
66
"private": true,
77
"dependencies": {
8-
"prop-types": "^15.7.2",
98
"react": "link:../node_modules/react",
109
"react-bottom-scroll-listener": "link:..",
1110
"react-dom": "link:../node_modules/react-dom",
12-
"react-scripts": "^3.1.2",
13-
"react-toggle": "^4.0.2"
11+
"react-scripts": "link:../node_modules/react-scripts",
12+
"react-toggle": "^4.1.1"
1413
},
1514
"scripts": {
16-
"start": "react-scripts start",
17-
"build": "react-scripts build",
18-
"test": "react-scripts test --env=jsdom",
19-
"eject": "react-scripts eject"
15+
"start": "node ../node_modules/react-scripts/bin/react-scripts.js start",
16+
"build": "node ../node_modules/react-scripts/bin/react-scripts.js build",
17+
"test": "node ../node_modules/react-scripts/bin/react-scripts.js test",
18+
"eject": "node ../node_modules/react-scripts/bin/react-scripts.js eject"
2019
},
21-
"browserslist": {
22-
"production": [
23-
">0.2%",
24-
"not dead",
25-
"not op_mini all"
26-
],
27-
"development": [
28-
"last 1 chrome version",
29-
"last 1 firefox version",
30-
"last 1 safari version"
31-
]
32-
}
20+
"eslintConfig": {
21+
"extends": "react-app"
22+
},
23+
"browserslist": [
24+
">0.2%",
25+
"not dead",
26+
"not ie <= 11",
27+
"not op_mini all"
28+
]
3329
}

example/public/favicon.ico

3.78 KB
Binary file not shown.

example/src/HookExample.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const HookExample = ({ alertOnBottom }) => {
77
console.log('I am at bottom! ' + Math.round(performance.now()))
88

99
if (alertOnBottom) {
10-
alert('Bottom hit! Too slow? Reduce "debounce" value in props')
10+
alert('Bottom hit!')
1111
}
1212
}, [alertOnBottom])
1313

1414
const handleContainerOnBottom = useCallback(() => {
1515
console.log('I am at bottom in optional container! ' + Math.round(performance.now()))
1616

1717
if (alertOnBottom) {
18-
alert('Bottom of this container hit! Too slow? Reduce "debounce" value in props')
18+
alert('Bottom of this container hit!')
1919
}
2020
}, [alertOnBottom])
2121

0 commit comments

Comments
 (0)