Skip to content

Commit

Permalink
rewrite with typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
iamraphson committed Mar 29, 2020
1 parent 8fed7bf commit 310adc2
Show file tree
Hide file tree
Showing 52 changed files with 16,261 additions and 25,088 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

66 changes: 66 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.idea
.DS_Store

dist/

.docz/

/example
33 changes: 33 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
env:
browser: true
es6: true
node: true
extends:
- "eslint:recommended"
- "plugin:@typescript-eslint/eslint-recommended"
- "plugin:@typescript-eslint/recommended"
- "plugin:prettier/recommended"
- "prettier/react"
- "prettier/@typescript-eslint"
- "plugin:jest/recommended"
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parser: "@typescript-eslint/parser"
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 2018
sourceType: module
plugins:
- react
- "@typescript-eslint"
- prettier
- jest
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/interface-name-prefix": "off"
}
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"jsxBracketSameLine": false
}
2 changes: 0 additions & 2 deletions Contributors.md

This file was deleted.

2 changes: 2 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as usePaystackPayment } from './use-paystack';
export { default as PaystackButton } from './paystack-button';
124 changes: 124 additions & 0 deletions dist/index.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.es.js.map

Large diffs are not rendered by default.

132 changes: 132 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions dist/paystack-button.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { ReactNode } from 'react';
import { PaystackProps } from './types';
interface PaystackButtonProps extends PaystackProps {
text?: string;
className?: string;
children?: ReactNode;
onSuccess?: Function;
onClose?: Function;
}
declare const PaystackButton: ({ text, className, children, onSuccess, onClose, ...others }: PaystackButtonProps) => React.ReactNode;
export default PaystackButton;
1 change: 1 addition & 0 deletions dist/paystack-script.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function usePaystackScript(): boolean[];
Loading

0 comments on commit 310adc2

Please sign in to comment.