From 699de52dc96ef714b52b0ac2df906dbc0e94cbe6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=A5=E5=9B=BD=E5=AE=87?= <841185308@qq.com>
Date: Tue, 10 Oct 2023 13:52:32 +0800
Subject: [PATCH] chore: Fix files code style (#2864)
---
packages/neuron-ui/.storybook/.babelrc | 5 +-
packages/neuron-ui/.storybook/electron.js | 6 +-
packages/neuron-ui/.storybook/preview.tsx | 25 ++++---
packages/neuron-ui/public/css/fonts.css | 10 +--
packages/neuron-ui/public/index.html | 32 ++++----
.../balanceSyncIcon.module.scss | 2 +-
.../SendFieldset/sendFieldset.module.scss | 2 +-
.../WalletWizard/walletWizard.module.scss | 6 +-
packages/neuron-ui/src/stories/styles.scss | 3 +-
.../src/widgets/Calendar/calendar.module.scss | 74 +++++++++----------
.../copyZoneAddress.module.scss | 2 +-
.../datetimePickerDialog.module.scss | 2 +-
.../DropdownButton/dropdownButton.module.scss | 2 +-
.../widgets/MnemonicInput/index.module.scss | 12 +--
.../src/widgets/Select/select.module.scss | 11 ++-
.../indexer-cache-service.intg.test.ts | 34 +++++----
.../tests/controllers/export-debug.test.ts | 6 +-
.../tests/controllers/sync-api.test.ts | 8 +-
.../tests/models/chain/fixtures/tx.json | 5 +-
.../tests/models/chain/live-cell.test.ts | 2 +-
.../tests/services/ckb-runner.test.ts | 6 +-
.../tests/services/indexer.test.ts | 12 +--
.../tests/services/light-runner.test.ts | 38 ++++++----
.../neuron-wallet/tests/utils/ckb-rpc.test.ts | 2 +-
.../tests/utils/fixtures/worker.js | 9 +--
25 files changed, 163 insertions(+), 153 deletions(-)
diff --git a/packages/neuron-ui/.storybook/.babelrc b/packages/neuron-ui/.storybook/.babelrc
index c0993b53fd..3313ff9ef0 100644
--- a/packages/neuron-ui/.storybook/.babelrc
+++ b/packages/neuron-ui/.storybook/.babelrc
@@ -1,6 +1,3 @@
{
- "presets": [
- "@babel/preset-env",
- "@babel/preset-typescript"
- ]
+ "presets": ["@babel/preset-env", "@babel/preset-typescript"]
}
diff --git a/packages/neuron-ui/.storybook/electron.js b/packages/neuron-ui/.storybook/electron.js
index 38f9aa5b6b..78003d8100 100644
--- a/packages/neuron-ui/.storybook/electron.js
+++ b/packages/neuron-ui/.storybook/electron.js
@@ -1,6 +1,6 @@
const sendSyncValues = {
'get-locale': 'zh',
- 'get-version': '0.103.1'
+ 'get-version': '0.103.1',
}
module.exports = {
@@ -12,10 +12,10 @@ module.exports = {
return Promise.resolve({})
},
on() {},
- removeAllListeners() {}
+ removeAllListeners() {},
},
clipboard() {},
nativeImage() {},
shell() {},
- desktopCapturer() {}
+ desktopCapturer() {},
}
diff --git a/packages/neuron-ui/.storybook/preview.tsx b/packages/neuron-ui/.storybook/preview.tsx
index d309b30e90..e77da948c7 100644
--- a/packages/neuron-ui/.storybook/preview.tsx
+++ b/packages/neuron-ui/.storybook/preview.tsx
@@ -9,31 +9,38 @@ import { action } from '@storybook/addon-actions'
import { NeuronWalletContext, initStates } from '../src/states'
export const parameters = {
- actions: { argTypesRegex: "^on[A-Z].*" },
+ actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
- }
+ },
}
const dispatch = action('Dispatch')
-BigInt.prototype['toJSON'] = function() { return this.toString() }
+BigInt.prototype['toJSON'] = function () {
+ return this.toString()
+}
export const decorators = [
(Story, { argTypes, args }) => {
const globalArgTypes = Object.keys(argTypes).filter(v => argTypes[v]?.isGlobal)
- const globalStates = globalArgTypes.reduce((pre, cur) => args[cur] ? ({
- ...pre,
- [cur]: args[cur]
- }) : pre, initStates)
+ const globalStates = globalArgTypes.reduce(
+ (pre, cur) =>
+ args[cur]
+ ? {
+ ...pre,
+ [cur]: args[cur],
+ }
+ : pre,
+ initStates
+ )
return (