Skip to content

Commit 0c1947a

Browse files
committed
first commit
0 parents  commit 0c1947a

22 files changed

+46848
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2020: true,
5+
},
6+
extends: [
7+
'plugin:react/recommended',
8+
'airbnb',
9+
'plugin:prettier/recommended',
10+
'plugin:@typescript-eslint/eslint-recommended',
11+
'plugin:@typescript-eslint/recommended',
12+
],
13+
parser: '@typescript-eslint/parser',
14+
parserOptions: {
15+
ecmaFeatures: {
16+
jsx: true,
17+
},
18+
ecmaVersion: 11,
19+
sourceType: 'module',
20+
},
21+
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
22+
settings: {
23+
'import/resolver': {
24+
node: {
25+
extensions: ['.js', '.ts', '.tsx'],
26+
},
27+
},
28+
},
29+
rules: {
30+
'react-hooks/rules-of-hooks': 'error',
31+
'react-hooks/exhaustive-deps': 'error',
32+
'@typescript-eslint/explicit-function-return-type': 'off',
33+
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }],
34+
'react/prop-types': 'off',
35+
'react/jsx-one-expression-per-line': 'off',
36+
'import/extensions': ['error', 'never'],
37+
'import/prefer-default-export': 'off',
38+
'import/no-unresolved': ['error', { ignore: ['react-hooks-fetch'] }],
39+
camelcase: [
40+
'error',
41+
{
42+
properties: 'never',
43+
ignoreDestructuring: false,
44+
allow: ['first_name'],
45+
},
46+
],
47+
'react/state-in-constructor': 'off',
48+
'no-console': 'off',
49+
},
50+
};

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
5+
node_modules
6+
7+
# builds
8+
build
9+
dist
10+
.rpt2_cache
11+
12+
# misc
13+
.DS_Store
14+
.env
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*

.prettierrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
singleQuote: true,
3+
printWidth: 80,
4+
};

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- 8
4+
env:
5+
- SKIP_PREFLIGHT_CHECK=true

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# react-use-hotjar
2+
3+
> Add Hotjar capabilities as hooks
4+
5+
[![NPM](https://img.shields.io/npm/v/react-use-hotjar.svg)](https://www.npmjs.com/package/react-use-hotjar)
6+
7+
## Install
8+
9+
```bash
10+
npm install --save react-use-hotjar
11+
```
12+
13+
## Usage
14+
15+
```tsx
16+
import * as React from "react";
17+
18+
import { useMyHook } from "react-use-hotjar";
19+
20+
const Example = () => {
21+
const example = useMyHook();
22+
return <div>{example}</div>;
23+
};
24+
```
25+
26+
## License
27+
28+
MIT © [Olavo Parno](https://github.com/Olavo Parno)
29+
30+
---
31+
32+
This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).

0 commit comments

Comments
 (0)