Skip to content

Commit 484d234

Browse files
committed
feat: Hello use-intersection 🎉
1 parent 3c658f1 commit 484d234

31 files changed

Lines changed: 16582 additions & 0 deletions

.circleci/config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
3+
references:
4+
yarn_cache_config: &yarn_cache_config
5+
key: dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "package.json" }}
6+
paths:
7+
- node_modules
8+
9+
yarn_restore_cache: &yarn_restore_cache
10+
restore_cache:
11+
<<: *yarn_cache_config
12+
name: Restore yarn cache
13+
14+
yarn_save_cache: &yarn_save_cache
15+
save_cache:
16+
<<: *yarn_cache_config
17+
name: Save yarn cache
18+
19+
jobs:
20+
build:
21+
docker:
22+
- image: catsoss/node-headless-chrome
23+
working_directory: ~/workspace
24+
steps:
25+
- checkout
26+
- *yarn_restore_cache
27+
- run: yarn --pure-lockfile
28+
- *yarn_save_cache
29+
- run: yarn build
30+
- run: yarn test
31+
- run: yarn lint
32+
- run: yarn format && git diff --exit-code || exit 1

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/ssr/node_modules/*

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
sourceType: 'module',
5+
project: './tsconfig.json',
6+
ecmaFeatures: {
7+
jsx: true,
8+
},
9+
},
10+
plugins: ['@typescript-eslint', 'react'],
11+
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:prettier/recommended'],
12+
env: {
13+
node: true,
14+
browser: true,
15+
jest: true,
16+
},
17+
globals: {
18+
page: true,
19+
browser: true,
20+
context: true,
21+
jestPuppeteer: true,
22+
},
23+
settings: {
24+
react: {
25+
version: 'detect',
26+
},
27+
},
28+
rules: {
29+
'react/display-name': 'off',
30+
'react/prop-types': 'off',
31+
},
32+
};

.github/ISSUE_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- Please replace {Please write here} with your description -->
2+
3+
## Expected Behavior
4+
5+
{Please write here}
6+
7+
## Actual Behavior
8+
9+
{Please write here}
10+
11+
## Steps to Reproduce (including precondition)
12+
13+
{Please write here}
14+
15+
## Screenshot on This Problem (if possible)
16+
17+
{Please write here}
18+
19+
## Your Environment
20+
21+
- OS: {Please write here}
22+
- use-intersection version: {Please write here}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Thank you for your contribution to use-intersection! Please replace {Please write here} with your description -->
2+
3+
## What does this do / why do we need it?
4+
5+
{Please write here}
6+
7+
## How this PR fixes the problem?
8+
9+
{Please write here}
10+
11+
## What should your reviewer look out for in this PR?
12+
13+
{Please write here}
14+
15+
## Check lists
16+
17+
- [ ] Test passed
18+
- [ ] Coding style (indentation, etc)
19+
20+
## Additional Comments (if any)
21+
22+
{Please write here}
23+
24+
## Which issue(s) does this PR fix?
25+
26+
<!--
27+
fixes #
28+
fixes #
29+
-->

.gitignore

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/lib
2+
/storybook-static
3+
4+
# Created by https://www.gitignore.io/api/osx,windows,node
5+
# Edit at https://www.gitignore.io/?templates=osx,windows,node
6+
7+
### Node ###
8+
# Logs
9+
logs
10+
*.log
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
25+
coverage
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# TypeScript v1 declaration files
47+
typings/
48+
49+
# Optional npm cache directory
50+
.npm
51+
52+
# Optional eslint cache
53+
.eslintcache
54+
55+
# Optional REPL history
56+
.node_repl_history
57+
58+
# Output of 'npm pack'
59+
*.tgz
60+
61+
# Yarn Integrity file
62+
.yarn-integrity
63+
64+
# dotenv environment variables file
65+
.env
66+
.env.test
67+
68+
# parcel-bundler cache (https://parceljs.org/)
69+
.cache
70+
71+
# next.js build output
72+
.next
73+
74+
# nuxt.js build output
75+
.nuxt
76+
77+
# vuepress build output
78+
.vuepress/dist
79+
80+
# Serverless directories
81+
.serverless/
82+
83+
# FuseBox cache
84+
.fusebox/
85+
86+
# DynamoDB Local files
87+
.dynamodb/
88+
89+
### OSX ###
90+
# General
91+
.DS_Store
92+
.AppleDouble
93+
.LSOverride
94+
95+
# Icon must end with two \r
96+
Icon
97+
98+
# Thumbnails
99+
._*
100+
101+
# Files that might appear in the root of a volume
102+
.DocumentRevisions-V100
103+
.fseventsd
104+
.Spotlight-V100
105+
.TemporaryItems
106+
.Trashes
107+
.VolumeIcon.icns
108+
.com.apple.timemachine.donotpresent
109+
110+
# Directories potentially created on remote AFP share
111+
.AppleDB
112+
.AppleDesktop
113+
Network Trash Folder
114+
Temporary Items
115+
.apdisk
116+
117+
### Windows ###
118+
# Windows thumbnail cache files
119+
Thumbs.db
120+
ehthumbs.db
121+
ehthumbs_vista.db
122+
123+
# Dump file
124+
*.stackdump
125+
126+
# Folder config file
127+
[Dd]esktop.ini
128+
129+
# Recycle Bin used on file shares
130+
$RECYCLE.BIN/
131+
132+
# Windows Installer files
133+
*.cab
134+
*.msi
135+
*.msix
136+
*.msm
137+
*.msp
138+
139+
# Windows shortcuts
140+
*.lnk
141+
142+
# End of https://www.gitignore.io/api/osx,windows,node

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
lib
2+
examples/ssr/.next

.prettierrc.js

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

.storybook/addons.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import '@storybook/addon-actions/register';
2+
import '@storybook/addon-options/register';
3+
import '@storybook/addon-knobs/register';

.storybook/config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { addParameters, configure } from '@storybook/react';
2+
3+
addParameters({
4+
options: {
5+
name: 'useIntersection',
6+
sidebarAnimations: false,
7+
},
8+
});
9+
10+
const req = require.context('../src/', true, /.*\.stories\.tsx$/);
11+
12+
configure(() => {
13+
req.keys().forEach((filename) => req(filename));
14+
}, module);

0 commit comments

Comments
 (0)