Skip to content

Commit 13f7a4d

Browse files
added hidden files
1 parent 6224f0d commit 13f7a4d

14 files changed

+427
-0
lines changed

.babelrc

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"presets": [
3+
[
4+
"next/babel",
5+
{
6+
"preset-env": {
7+
"useBuiltIns": "usage"
8+
}
9+
}
10+
]
11+
],
12+
"plugins": [
13+
[
14+
"module-resolver",
15+
{
16+
"alias": {
17+
"src": "./src"
18+
}
19+
}
20+
],
21+
"@babel/plugin-proposal-class-properties"
22+
],
23+
"env": {
24+
"test": {
25+
"presets": [["@babel/preset-env", { "modules": false }], "next/babel"]
26+
}
27+
}
28+
}

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.env

.editorconfig

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

.env

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
DATABASE_URL="postgresql://user:pass@localhost:5432/db?schema=public"
2+
API_HOST="http://localhost:3000"
3+
4+
TESTWYRE_ACCOUNT_ID="AC_TJM7VTUR2JG"
5+
TESTWYRE_API_HOST="api.testwyre.com"
6+
TESTWYRE_PAY_HOST="pay.testwyre.com"
7+
TESTWYRE_API_KEY="AK-78ETD827-66W4ZMAP-LDXXHDNH-92LV9FFC"
8+
TESTWYRE_SECRET_KEY="SK-AZCMZ3Z4-3ECW6M2P-PN7FPATH-RDC63MLL"
9+
10+
SENDWYRE_ACCOUNT_ID="AC_DWVWRDXUNTH"
11+
SENDWYRE_API_HOST="api.sendwyre.com"
12+
SENDWYRE_PAY_HOST="pay.sendwyre.com"
13+
SENDWYRE_API_KEY=""
14+
SENDWYRE_SECRET_KEY=""
15+
16+
WYRE_WEBHOOK_KEY="ac0468799de598a447f5c53ee73cfd3845d0e6507abbedf7352ab9524414c1a5"
17+
18+
TEST_MOON_PAY_HOST="buy-staging.moonpay.io"
19+
TEST_MOON_PAY_KEY="pk_test_w0ehD69XnRdMapvfmMjK1t33NlZPPD"
20+
TEST_MOON_PAY_SECRET_KEY="sk_test_Oso8znoaLIlsmLPP9wqNFWjqdSGNh5k"
21+
PROD_MOON_PAY_HOST="buy.moonpay.io"
22+
PROD_MOON_PAY_KEY=""
23+
PROD_MOON_PAY_SECRET_KEY=""
24+
MOONPAY_API_HOST="api.moonpay.io/v3"
25+
26+
LATAMEX_ENABLED=1
27+
LATAMEX_API_HOST="https://api-staging.zetl.network"
28+
LATAMEX_API_USER="oasis@latamex.com"
29+
LATAMEX_API_PASSWORD="9T7YkEMQivBQ5D4qhHJr"
30+
31+
CHALLENGE_JWT_SECRET="ABC123"
32+
USER_JWT_SECRET="A123124124"
33+
34+
COMPOUND_API_HOST="api.compound.finance"
35+
36+
GRAPH_API_HOST="api.thegraph.com"
37+
38+
CONTACT_EMAILS_SENDER=noreply@oasis.app
39+
CONTACT_EMAILS_RECEIVER=support@oasis.app
40+
SMTP_USERNAME=alicia.deckow65@ethereal.email
41+
SMTP_PASSWORD_SECRET=5EY58GHxqwJSNKRkBv
42+
SMTP_SERVER_NAME=smtp.ethereal.email
43+
SMTP_PORT=587

.eslintrc.json

+205
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
{
2+
"ignorePatterns": ["node_modules/"],
3+
"env": {
4+
"es6": true
5+
},
6+
"extends": ["typestrict"],
7+
"plugins": ["no-only-tests", "simple-import-sort", "import", "react", "unused-imports"],
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"project": "./tsconfig.json",
11+
"sourceType": "module"
12+
},
13+
"rules": {
14+
"unused-imports/no-unused-imports-ts": "error",
15+
"react/jsx-uses-react": "error",
16+
"react/jsx-uses-vars": "error",
17+
"import/no-default-export": "error",
18+
"simple-import-sort/sort": [
19+
"error",
20+
{
21+
"groups": [
22+
// Side effect imports.
23+
["^\\u0000"],
24+
// Packages.
25+
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
26+
["^@?\\w"],
27+
// Absolute imports and other imports such as Vue-style `@/foo`.
28+
// Anything that does not start with a dot.
29+
["^[^.]"],
30+
// Relative imports.
31+
// Anything that starts with a dot.
32+
// anything that stars with /src (out custom path)
33+
["(^\\.|src/)"]
34+
]
35+
}
36+
],
37+
"func-style": ["error", "declaration"],
38+
"@typescript-eslint/no-use-before-define": "off",
39+
"@typescript-eslint/no-useless-constructor": "error",
40+
"accessor-pairs": "error",
41+
"constructor-super": "error",
42+
"eqeqeq": [
43+
"error",
44+
"always",
45+
{
46+
"null": "ignore"
47+
}
48+
],
49+
"handle-callback-err": ["error", "^(err|error)$"],
50+
"new-parens": "error",
51+
"no-array-constructor": "error",
52+
"no-async-promise-executor": "error",
53+
"no-caller": "error",
54+
"no-class-assign": "error",
55+
"no-compare-neg-zero": "error",
56+
"no-cond-assign": "error",
57+
"no-const-assign": "error",
58+
"no-constant-condition": [
59+
"error",
60+
{
61+
"checkLoops": false
62+
}
63+
],
64+
"no-control-regex": "error",
65+
"no-debugger": "error",
66+
"no-delete-var": "error",
67+
"no-dupe-args": "error",
68+
"no-dupe-keys": "error",
69+
"no-duplicate-case": "error",
70+
"no-empty-character-class": "error",
71+
"no-empty-pattern": "error",
72+
"no-eval": "error",
73+
"no-ex-assign": "error",
74+
"no-extend-native": "error",
75+
"no-extra-bind": "error",
76+
"no-extra-boolean-cast": "error",
77+
"no-fallthrough": "error",
78+
"no-floating-decimal": "error",
79+
"no-func-assign": "error",
80+
"no-global-assign": "error",
81+
"no-implied-eval": "error",
82+
"no-inner-declarations": ["error", "functions"],
83+
"no-invalid-regexp": "error",
84+
"no-iterator": "error",
85+
"no-label-var": "error",
86+
"no-labels": [
87+
"error",
88+
{
89+
"allowLoop": false,
90+
"allowSwitch": false
91+
}
92+
],
93+
"no-lone-blocks": "error",
94+
"no-misleading-character-class": "error",
95+
"no-multi-str": "error",
96+
"no-multiple-empty-lines": [
97+
"error",
98+
{
99+
"max": 1,
100+
"maxEOF": 0
101+
}
102+
],
103+
"no-negated-in-lhs": "error",
104+
"no-new": "error",
105+
"no-new-func": "error",
106+
"no-new-object": "error",
107+
"no-new-require": "error",
108+
"no-new-symbol": "error",
109+
"no-new-wrappers": "error",
110+
"no-obj-calls": "error",
111+
"no-octal": "error",
112+
"no-octal-escape": "error",
113+
"no-path-concat": "error",
114+
"no-proto": "error",
115+
"no-redeclare": [
116+
"error",
117+
{
118+
"builtinGlobals": false
119+
}
120+
],
121+
"no-invalid-this": "off",
122+
"no-use-before-define": "off",
123+
"no-regex-spaces": "error",
124+
"no-return-assign": ["error", "except-parens"],
125+
"no-self-assign": "error",
126+
"no-self-compare": "error",
127+
"no-sequences": "error",
128+
"no-shadow-restricted-names": "error",
129+
"no-sparse-arrays": "error",
130+
"no-tabs": "error",
131+
"no-this-before-super": "error",
132+
"no-throw-literal": "error",
133+
"no-unexpected-multiline": "error",
134+
"no-unmodified-loop-condition": "error",
135+
"no-unneeded-ternary": [
136+
"error",
137+
{
138+
"defaultAssignment": false
139+
}
140+
],
141+
"no-unreachable": "error",
142+
"no-unsafe-finally": "error",
143+
"no-unsafe-negation": "error",
144+
"no-restricted-imports": ["error"],
145+
"no-useless-call": "error",
146+
"no-useless-catch": "error",
147+
"no-useless-computed-key": "error",
148+
"no-useless-escape": "error",
149+
"no-useless-rename": "error",
150+
"no-useless-return": "error",
151+
"no-with": "error",
152+
"object-curly-spacing": ["error", "always"],
153+
"object-property-newline": [
154+
"error",
155+
{
156+
"allowMultiplePropertiesPerLine": true
157+
}
158+
],
159+
"one-var": [
160+
"error",
161+
{
162+
"initialized": "never"
163+
}
164+
],
165+
"prefer-const": [
166+
"error",
167+
{
168+
"destructuring": "all"
169+
}
170+
],
171+
"prefer-promise-reject-errors": "error",
172+
"symbol-description": "error",
173+
"unicode-bom": ["error", "never"],
174+
"use-isnan": "error",
175+
"valid-typeof": [
176+
"error",
177+
{
178+
"requireStringLiterals": true
179+
}
180+
],
181+
"wrap-iife": [
182+
"error",
183+
"any",
184+
{
185+
"functionPrototypeMethods": true
186+
}
187+
],
188+
"yoda": ["error", "never"],
189+
"no-only-tests/no-only-tests": "error"
190+
},
191+
"overrides": [
192+
{
193+
"files": ["pages/**/*.{ts,tsx}"],
194+
"rules": {
195+
"import/no-default-export": "off"
196+
}
197+
},
198+
{
199+
"files": ["**/*.tsx"],
200+
"rules": {
201+
"func-style": "off"
202+
}
203+
}
204+
]
205+
}

.mocharc.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const { join } = require('path')
2+
const { existsSync } = require('fs')
3+
process.env.NODE_ENV = 'test'
4+
5+
// if test config exists in cwd prefer this one
6+
const testTsconfigPath = join(process.cwd(), 'tsconfig.test.json')
7+
if (existsSync(testTsconfigPath)) {
8+
process.env.TS_NODE_PROJECT = testTsconfigPath
9+
}
10+
11+
// we need to transpile typescript files in node_modules because some dependencies are distributed as typescript files
12+
// transpile pg_packet-stream because it's written in TS :O
13+
process.env.TS_NODE_IGNORE = '/^node_modules/((?!pg-packet-stream).)*$/'
14+
15+
module.exports = {
16+
require: ['ts-node/register/transpile-only', 'tsconfig-paths/register'],
17+
extension: ['ts'],
18+
watchExtensions: ['ts'],
19+
spec: ['./helpers/**/*.test.ts', './components/**/*.test.ts'],
20+
timeout: 1000,
21+
}
22+
23+
// do not import files that we don't care about
24+
function noop() {
25+
return null
26+
}
27+
require.extensions['.svg'] = noop
28+
require.extensions['.mdx'] = noop
29+
30+
// setup chai
31+
var chai = require('chai')
32+
var sinonChai = require('sinon-chai')
33+
chai.use(sinonChai)

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
11.15

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.vscode
3+
package.json
4+
**/dist/**
5+
.next/

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"proseWrap": "always"
8+
}

.storybook/RouterDecorator.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { RouterContext } from 'next/dist/next-server/lib/router-context'
2+
import { useState } from 'react'
3+
import Router from 'next/router'
4+
5+
function RouterMock(storyFn) {
6+
const [pathname, setPathname] = useState('/')
7+
8+
const mockRouter = {
9+
query: {},
10+
pathname,
11+
prefetch: () => {},
12+
push: async (newPathname) => {
13+
setPathname(newPathname)
14+
},
15+
}
16+
17+
Router.router = mockRouter
18+
19+
return <RouterContext.Provider value={mockRouter}>{storyFn()}</RouterContext.Provider>
20+
}
21+
22+
export default RouterMock

.storybook/ThemeDecorator.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react'
2+
import { ThemeProvider } from 'theme-ui'
3+
import { theme } from '../theme'
4+
import { merge } from 'lodash'
5+
6+
const ThemeDecorator = (storyFn) => <ThemeProvider theme={theme}>{storyFn()}</ThemeProvider>
7+
8+
export default ThemeDecorator

0 commit comments

Comments
 (0)