Skip to content

Commit 72b3a35

Browse files
committed
npx prettier --write "**/*.{jsx,tsx,ts,js,json}"
1 parent 19e9de3 commit 72b3a35

File tree

143 files changed

+2163
-3772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2163
-3772
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module.exports = {
33
env: {
44
browser: true,
55
},
6-
plugins: ["@typescript-eslint", "react-hooks"],
6+
plugins: ['@typescript-eslint', 'react-hooks'],
77
rules: {
8-
'require-await': 'off'
8+
'require-await': 'off',
99
},
1010
};

config/TimingCompilationPlugin.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
function TimingCompilationPlugin(options) { }
1+
function TimingCompilationPlugin(options) {}
22

3-
let t0 = new Date;
3+
let t0 = new Date();
44

5-
TimingCompilationPlugin.prototype.apply = function (compiler) {
6-
compiler.plugin("compile", function (compilation) {
7-
t0 = new Date();
8-
});
5+
TimingCompilationPlugin.prototype.apply = function(compiler) {
6+
compiler.plugin('compile', function(compilation) {
7+
t0 = new Date();
8+
});
99

10-
compiler.plugin("done", function (compilation) {
11-
const diff = new Date().valueOf() - t0.valueOf();
12-
console.log(`[Compilation time: ${diff}ms]`);
13-
});
10+
compiler.plugin('done', function(compilation) {
11+
const diff = new Date().valueOf() - t0.valueOf();
12+
console.log(`[Compilation time: ${diff}ms]`);
13+
});
1414
};
1515

16-
module.exports = TimingCompilationPlugin;
16+
module.exports = TimingCompilationPlugin;

config/paths.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ function ensureSlash(path, needsSlash) {
2222
}
2323
}
2424

25-
const getPublicUrl = appPackageJson =>
26-
envPublicUrl || require(appPackageJson).homepage;
25+
const getPublicUrl = appPackageJson => envPublicUrl || require(appPackageJson).homepage;
2726

2827
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
2928
// "public path" at which the app is served.
@@ -33,8 +32,7 @@ const getPublicUrl = appPackageJson =>
3332
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
3433
function getServedPath(appPackageJson) {
3534
const publicUrl = getPublicUrl(appPackageJson);
36-
const servedUrl = envPublicUrl ||
37-
(publicUrl ? url.parse(publicUrl).pathname : '/');
35+
const servedUrl = envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
3836
return ensureSlash(servedUrl, true);
3937
}
4038

config/rules/other.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module.exports = () => [
33
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.svg$/],
44
loader: require.resolve('url-loader'),
55
options: {
6-
limit: 10000,
7-
name: 'static/media/[name].[hash:8].[ext]',
6+
limit: 10000,
7+
name: 'static/media/[name].[hash:8].[ext]',
88
},
9-
},
9+
},
1010
];

config/rules/styles.js

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
11
const paths = require('../paths');
22

33
module.exports = () => [
4-
{
5-
test: /\.(styl)$/,
6-
use: [
7-
'style-loader',
8-
'css-loader?modules',
9-
// 'css-loader',
10-
{
11-
loader: "stylus-loader", // compiles Stylus to CSS
12-
options: {
13-
preferPathResolver: 'webpack',
14-
}
15-
}
16-
],
17-
},
18-
{
19-
test: /\.(css)$/,
20-
use: [
21-
'style-loader',
22-
'css-loader'
23-
],
24-
},
25-
{
26-
test: /\.(scss)$/,
27-
use: [
28-
'style-loader',
29-
'css-loader',
30-
'sass-loader'
31-
],
32-
}
4+
{
5+
test: /\.(styl)$/,
6+
use: [
7+
'style-loader',
8+
'css-loader?modules',
9+
// 'css-loader',
10+
{
11+
loader: 'stylus-loader', // compiles Stylus to CSS
12+
options: {
13+
preferPathResolver: 'webpack',
14+
},
15+
},
16+
],
17+
},
18+
{
19+
test: /\.(css)$/,
20+
use: ['style-loader', 'css-loader'],
21+
},
22+
{
23+
test: /\.(scss)$/,
24+
use: ['style-loader', 'css-loader', 'sass-loader'],
25+
},
3326
];

config/webpackDevServer.config.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ const allowedHost = urls.lanUrlForConfig;
1414
const ignoredFiles = require('react-dev-utils/ignoredFiles');
1515

1616
function onProxyRes(proxyResponse) {
17-
if (proxyResponse.headers['set-cookie']) {
18-
const cookies = proxyResponse.headers['set-cookie'].map(cookie =>
19-
cookie.replace(/; (secure|HttpOnly|SameSite=Strict)/gi, '')
20-
);
17+
if (proxyResponse.headers['set-cookie']) {
18+
const cookies = proxyResponse.headers['set-cookie'].map(cookie =>
19+
cookie.replace(/; (secure|HttpOnly|SameSite=Strict)/gi, ''),
20+
);
2121

22-
proxyResponse.headers['set-cookie'] = cookies;
23-
}
22+
proxyResponse.headers['set-cookie'] = cookies;
23+
}
2424
}
2525

2626
function onProxyReq(proxyResponse, req) {
27-
if (req.headers.cookie) {
28-
proxyResponse.setHeader('cookie', req.headers.cookie);
29-
}
27+
if (req.headers.cookie) {
28+
proxyResponse.setHeader('cookie', req.headers.cookie);
29+
}
3030
}
3131

3232
module.exports = function() {
3333
return {
34-
stats: "errors-only",
34+
stats: 'errors-only',
3535
// disableHostCheck: !proxy ||
3636
// process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
3737
disableHostCheck: true,

png.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module "*.png" {
1+
declare module '*.png' {
22
const value: any;
33
export default value;
44
}

scripts/build.js

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ process.on('unhandledRejection', err => {
1212
throw err;
1313
});
1414

15-
1615
const path = require('path');
1716
const chalk = require('chalk');
1817
const fs = require('fs-extra');
@@ -54,15 +53,9 @@ measureFileSizesBeforeBuild(paths.appBuild)
5453
console.log(chalk.yellow('Compiled with warnings.\n'));
5554
console.log(warnings.join('\n\n'));
5655
console.log(
57-
'\nSearch for the ' +
58-
chalk.underline(chalk.yellow('keywords')) +
59-
' to learn more about each warning.'
60-
);
61-
console.log(
62-
'To ignore, add ' +
63-
chalk.cyan('// eslint-disable-next-line') +
64-
' to the line before.\n'
56+
'\nSearch for the ' + chalk.underline(chalk.yellow('keywords')) + ' to learn more about each warning.',
6557
);
58+
console.log('To ignore, add ' + chalk.cyan('// eslint-disable-next-line') + ' to the line before.\n');
6659
} else {
6760
console.log(chalk.green('Compiled successfully.\n'));
6861
}
@@ -73,27 +66,21 @@ measureFileSizesBeforeBuild(paths.appBuild)
7366
previousFileSizes,
7467
paths.appBuild,
7568
WARN_AFTER_BUNDLE_GZIP_SIZE,
76-
WARN_AFTER_CHUNK_GZIP_SIZE
69+
WARN_AFTER_CHUNK_GZIP_SIZE,
7770
);
7871
console.log();
7972

8073
const appPackage = require(paths.appPackageJson);
8174
const publicUrl = paths.publicUrl;
8275
const publicPath = config.output.publicPath;
8376
const buildFolder = path.relative(process.cwd(), paths.appBuild);
84-
printHostingInstructions(
85-
appPackage,
86-
publicUrl,
87-
publicPath,
88-
buildFolder,
89-
useYarn
90-
);
77+
printHostingInstructions(appPackage, publicUrl, publicPath, buildFolder, useYarn);
9178
},
9279
err => {
9380
console.log(chalk.red('Failed to compile.\n'));
9481
printBuildError(err);
9582
process.exit(1);
96-
}
83+
},
9784
);
9885

9986
// Create the production build and print the deployment instructions.
@@ -117,15 +104,14 @@ function build(previousFileSizes) {
117104
}
118105
if (
119106
process.env.CI &&
120-
(typeof process.env.CI !== 'string' ||
121-
process.env.CI.toLowerCase() !== 'false') &&
107+
(typeof process.env.CI !== 'string' || process.env.CI.toLowerCase() !== 'false') &&
122108
messages.warnings.length
123109
) {
124110
console.log(
125111
chalk.yellow(
126112
'\nTreating warnings as errors because process.env.CI = true.\n' +
127-
'Most CI servers set it automatically.\n'
128-
)
113+
'Most CI servers set it automatically.\n',
114+
),
129115
);
130116
return reject(new Error(messages.warnings.join('\n\n')));
131117
}

src/App.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ export const App: React.FC = () => {
2626
<Route exact path="/explorer" component={Explorer} />
2727
<Route exact path="/earn" component={EarnRewards} />
2828
<Route exact path="/:token" component={EthBridge} />
29-
<Route
30-
exact
31-
path="/:token/operations/:operationId"
32-
component={EthBridge}
33-
/>
29+
<Route exact path="/:token/operations/:operationId" component={EthBridge} />
3430
<Redirect to="/swap" />
3531
</Switch>
3632
</Suspense>

src/GlobalStyle.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@ import { transparentize } from 'polished';
33

44
export const GlobalStyle = createGlobalStyle<any>`
55
html {
6-
color: ${(props) => props.theme.colorSecondary};
7-
background-color: ${(props) => transparentize(
8-
0.9,
9-
props.theme.palette.Basic700
10-
)};
6+
color: ${props => props.theme.colorSecondary};
7+
background-color: ${props => transparentize(0.9, props.theme.palette.Basic700)};
118
}
129
1310
body {
1411
font-family: ${props => props.theme.fontBase || 'Nunito'};
1512
overflow-x: hidden;
1613
background-position: 0 100%;
1714
background-repeat: no-repeat;
18-
background-image: ${(props) =>
19-
`radial-gradient(50% 50% at 50% 50%, ${transparentize(0.4, props.theme.colorSecondary)} 0%, ${transparentize(
20-
0.9,
21-
props.theme.palette.Basic700
22-
)} 100%)`};
15+
background-image: ${props =>
16+
`radial-gradient(50% 50% at 50% 50%, ${transparentize(0.4, props.theme.colorSecondary)} 0%, ${transparentize(
17+
0.9,
18+
props.theme.palette.Basic700,
19+
)} 100%)`};
2320
}
2421
`;

0 commit comments

Comments
 (0)