From e1ee12cffbe12d7e5bdafdbb7aee2ce980644940 Mon Sep 17 00:00:00 2001 From: Tudor Gergely Date: Fri, 3 Apr 2020 09:05:18 +0300 Subject: [PATCH] [1.1.0] version 1.1.0 of use-scroll-to-bottom update create-react-library to version 3 change api to return a RefCallback instead of a Ref add tests to hook add tests to examples add 1 example with reusing the hook --- .eslintignore | 6 + .eslintrc | 33 + .idea/codeStyles/Project.xml | 36 + .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/workspace.xml | 521 +- .prettier.json | 9 + .travis.yml | 4 +- README.md | 10 +- example/README.md | 14 + example/package-lock.json | 525 + example/package.json | 35 +- example/public/favicon.ico | Bin 0 -> 3870 bytes example/public/index.html | 17 +- example/public/manifest.json | 9 +- example/src/App.js | 50 +- example/src/App.test.js | 11 + example/src/examples/DogsExample.js | 22 +- example/src/examples/ReuseRefExample.css | 12 + example/src/examples/ReuseRefExample.js | 47 + example/src/examples/ReuseRefExample.test.js | 90 + example/src/examples/SimpleExample.js | 18 +- example/src/examples/SimpleExample.test.js | 48 + example/src/index.css | 5 - example/src/index.js | 9 +- example/yarn.lock | 8167 -------- package-lock.json | 18661 +++++++++++++++++ package.json | 82 +- rollup.config.js | 42 - src/.eslintrc | 5 + src/index.test.tsx | 121 + src/index.tsx | 32 +- src/test.ts | 0 src/typings.d.ts | 5 +- test/utils.js | 34 + tsconfig.json | 36 +- yarn.lock | 10499 ---------- 36 files changed, 20288 insertions(+), 18932 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .prettier.json create mode 100644 example/README.md create mode 100644 example/package-lock.json create mode 100644 example/public/favicon.ico create mode 100644 example/src/App.test.js create mode 100644 example/src/examples/ReuseRefExample.css create mode 100644 example/src/examples/ReuseRefExample.js create mode 100644 example/src/examples/ReuseRefExample.test.js create mode 100644 example/src/examples/SimpleExample.test.js delete mode 100644 example/src/index.css delete mode 100644 example/yarn.lock create mode 100644 package-lock.json delete mode 100644 rollup.config.js create mode 100644 src/.eslintrc create mode 100644 src/index.test.tsx delete mode 100644 src/test.ts create mode 100644 test/utils.js delete mode 100644 yarn.lock diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..d482f7c --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +build/ +dist/ +node_modules/ +.snapshots/ +*.min.js +*.d.ts diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..e046d9c --- /dev/null +++ b/.eslintrc @@ -0,0 +1,33 @@ +{ + "parser": "babel-eslint", + "extends": [ + "standard", + "standard-react", + "plugin:prettier/recommended", + "prettier/standard", + "prettier/react" + ], + "env": { + "node": true + }, + "parserOptions": { + "ecmaVersion": 9, + "ecmaFeatures": { + "legacyDecorators": true, + "jsx": true + } + }, + "settings": { + "react": { + "version": "16" + } + }, + "rules": { + "space-before-function-paren": 0, + "react/prop-types": 0, + "react/jsx-handler-names": 0, + "react/jsx-fragments": 0, + "react/no-unused-prop-types": 0, + "import/export": 0 + } +} diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..dcefef0 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7b19d0e..235f810 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,8 +1,42 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -15,27 +49,101 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43,10 +151,23 @@ key + setRef + ref + -2 + 1.0.3 + 1.0.2 + + setBottomRef + + + $PROJECT_DIR$/example/src/examples + $PROJECT_DIR$ + - - - - + @@ -82,6 +212,7 @@ + @@ -113,11 +244,20 @@ + + + + + + + + + +