Skip to content

Commit 416eea7

Browse files
[DDW 944][DEBT] Remove SASS ts-ignore (#2870)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 125092b commit 416eea7

File tree

287 files changed

+2050
-2476
lines changed

Some content is hidden

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

287 files changed

+2050
-2476
lines changed

.github/workflows/chromatic.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ jobs:
2828
token: ${{ secrets.GITHUB_TOKEN }}
2929
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
3030
exitZeroOnChanges: true
31+
buildScriptName: 'storybook:build:chromatic'
3132
- name: Publish to Chromatic and auto accept changes
3233
if: github.ref == 'refs/heads/develop'
3334
uses: chromaui/action@v1
3435
with:
3536
token: ${{ secrets.GITHUB_TOKEN }}
3637
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
3738
autoAcceptChanges: true
39+
buildScriptName: 'storybook:build:chromatic'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,6 @@ Debug
119119
/cardano-cli
120120
/cardano-wallet
121121
.vscode
122+
123+
# Typescript
124+
*.scss.d.ts

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
- Fixed Daedalus menu in Storybook used for theme and language selection ([PR 2886](https://github.com/input-output-hk/daedalus/pull/2886))
2020

21+
### Chores
22+
- Removed SASS ts-lint ignore comments ([PR 2870](https://github.com/input-output-hk/daedalus/pull/2870))
23+
2124
## 4.9.0-FC1
2225

2326
### Features

gulpfile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ gulp.task(
171171
)
172172
);
173173

174+
gulp.task('typedef:sass', shell.task('yarn typedef:sass --watch'));
175+
174176
gulp.task(
175177
'build:watch',
176178
gulp.series(
@@ -206,7 +208,10 @@ gulp.task(
206208

207209
gulp.task(
208210
'dev',
209-
gulp.series('server:create:dev', 'build:watch', 'server:start')
211+
gulp.parallel(
212+
gulp.series('server:create:dev', 'build:watch', 'server:start'),
213+
gulp.series('typedef:sass')
214+
)
210215
);
211216

212217
gulp.task(

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"cleanup": "mop -v",
3636
"lint": "eslint --format=node_modules/eslint-formatter-pretty source storybook utils --ext .ts,.tsx",
3737
"compile": "tsc --noEmit",
38+
"precompile": "yarn typedef:sass",
3839
"prettier": "./node_modules/.bin/prettier \"**/*.*\"",
3940
"prettier:check": "yarn prettier --check",
4041
"prettier:format": "yarn prettier --write --loglevel warn",
@@ -43,6 +44,7 @@
4344
"manage:translations": "gulp purge:translations && gulp clear:cache && gulp build && ts-node ./translations/translation-runner.ts",
4445
"storybook": "start-storybook -p 6006 -c storybook --ci /",
4546
"storybook:build": "build-storybook -c storybook -o dist/storybook",
47+
"storybook:build:chromatic": "build-storybook -c storybook",
4648
"themes:check:createTheme": "gulp build:themes && ts-node -r esm ./dist/scripts/check.js",
4749
"themes:update": "gulp build:themes && ts-node -r esm ./dist/scripts/update.js && yarn prettier --loglevel warn --write source/renderer/app/themes/daedalus/*.ts",
4850
"themes:copy": "ts-node -r @babel/register -r @babel/polyfill source/renderer/app/themes/utils/copyTheme.ts && yarn prettier --loglevel warn --write source/renderer/app/themes/daedalus/*.ts",
@@ -62,7 +64,8 @@
6264
"yoroi:wallet:importer": "ts-node utils/api-importer/yoroi-wallet-importer.ts",
6365
"create-news-verification-hashes": "ts-node utils/create-news-verification-hashes/index.ts",
6466
"lockfile:check": "ts-node utils/lockfile-checker/index.ts --check",
65-
"lockfile:fix": "ts-node utils/lockfile-checker/index.ts --fix"
67+
"lockfile:fix": "ts-node utils/lockfile-checker/index.ts --fix",
68+
"typedef:sass": "typed-scss-modules source/renderer/app"
6669
},
6770
"bin": {
6871
"electron": "./node_modules/.bin/electron"
@@ -148,12 +151,12 @@
148151
"mini-css-extract-plugin": "0.12.0",
149152
"minimist": "1.2.5",
150153
"mobx-react-devtools": "6.1.1",
151-
"node-forge": "0.10.0",
154+
"node-forge": "1.0.0",
152155
"node-libs-browser": "2.2.1",
153156
"node-sass": "4.14.1",
154157
"nodemon": "2.0.4",
155158
"npmlog": "4.1.2",
156-
"postcss": "7.0.39",
159+
"postcss": "8.2.13",
157160
"postcss-modules": "1.5.0",
158161
"prettier": "2.1.2",
159162
"pretty-quick": "3.0.2",
@@ -175,6 +178,7 @@
175178
"timemachine": "0.3.2",
176179
"transform-loader": "0.2.4",
177180
"ts-node": "^10.4.0",
181+
"typed-scss-modules": "5.0.0",
178182
"typescript": "^4.5.5",
179183
"url-loader": "2.0.1",
180184
"utf-8-validate": "5.0.2",
@@ -232,6 +236,7 @@
232236
"mobx-react-form": "2.0.8",
233237
"mobx-react-router": "4.1.0",
234238
"moment": "2.29.0",
239+
"nanoid": "3.2.0",
235240
"node-downloader-helper": "1.0.18",
236241
"omit-deep-lodash": "1.1.5",
237242
"pbkdf2": "3.0.17",

source/renderer/app/components/appUpdate/AppUpdateOverlay.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin';
1313
import { ButtonSpinnerSkin } from 'react-polymorph/lib/skins/simple/ButtonSpinnerSkin';
1414
import ReactMarkdown from 'react-markdown';
1515
import News from '../../domains/News';
16-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module './AppUpdateOverlay.scss' or it... Remove this comment to see the full error message
1716
import styles from './AppUpdateOverlay.scss';
1817
import DialogCloseButton from '../widgets/DialogCloseButton';
1918
import ProgressBarLarge from '../widgets/ProgressBarLarge';
20-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module '../../assets/images/link-ic.in... Remove this comment to see the full error message
2119
import externalLinkIcon from '../../assets/images/link-ic.inline.svg';
22-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module '../../assets/images/close-cros... Remove this comment to see the full error message
2320
import closeCrossThin from '../../assets/images/close-cross-thin.inline.svg';
2421

2522
const messages = defineMessages({
@@ -209,7 +206,6 @@ class AppUpdateOverlay extends Component<Props, State> {
209206
const buttonStyles = classnames([
210207
styles.button,
211208
isButtonDisabled ? styles.disabled : null,
212-
isWaitingToQuitDaedalus ? styles.installing : null,
213209
]);
214210
const buttonLabel = isLinux
215211
? messages.buttonInstallUpdateLabel

source/renderer/app/components/assets/Asset.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ import classnames from 'classnames';
44
import { PopOver } from 'react-polymorph/lib/components/PopOver';
55
import { defineMessages, intlShape } from 'react-intl';
66
import { observer } from 'mobx-react';
7-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module './Asset.scss' or its correspon... Remove this comment to see the full error message
87
import styles from './Asset.scss';
98
import { ellipsis } from '../../utils/strings';
109
import AssetContent from './AssetContent';
11-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module '../../assets/images/asset-toke... Remove this comment to see the full error message
1210
import settingsIcon from '../../assets/images/asset-token-settings-ic.inline.svg';
13-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module '../../assets/images/asset-toke... Remove this comment to see the full error message
1411
import warningIcon from '../../assets/images/asset-token-warning-ic.inline.svg';
1512
import { ASSET_TOKEN_DISPLAY_DELAY } from '../../config/timingConfig';
1613
import type { Asset as AssetProps } from '../../api/assets/types';
@@ -250,7 +247,6 @@ class Asset extends Component<Props, State> {
250247
'--rp-pop-over-box-shadow':
251248
'0 5px 20px 0 var(--theme-widgets-asset-token-box-shadow)',
252249
}}
253-
contentClassName={styles.popOver}
254250
content={popOverContent}
255251
visible={isPillPopOverVisible}
256252
appendTo="parent"
@@ -288,7 +284,6 @@ class Asset extends Component<Props, State> {
288284
return (
289285
<button className={styles.settingsButton} onClick={onClickSettingsBind}>
290286
<PopOver
291-
className={styles.test}
292287
content={intl.formatMessage(messages.settingsCogPopOver)}
293288
visible={isSettingsPopOverVisible}
294289
>

source/renderer/app/components/assets/AssetAmount.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { PopOver } from 'react-polymorph/lib/components/PopOver';
55
import { defineMessages, FormattedHTMLMessage } from 'react-intl';
66
import { observer } from 'mobx-react';
77
import { discreetWalletTokenAmount } from '../../features/discreet-mode/replacers/discreetWalletTokenAmount';
8-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module './AssetAmount.scss' or its cor... Remove this comment to see the full error message
98
import styles from './AssetAmount.scss';
109
import type { AssetMetadata } from '../../api/assets/types';
1110
import { useDiscreetModeFeature } from '../../features/discreet-mode';

source/renderer/app/components/assets/AssetContent.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
flex-direction: column;
110110
width: 100%;
111111

112-
.assetASCIIName {
112+
.assetAsciiName {
113113
opacity: 0.5;
114114
}
115115
}

source/renderer/app/components/assets/AssetContent.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ import classnames from 'classnames';
44
import { defineMessages, intlShape, injectIntl } from 'react-intl';
55
import CopyToClipboard from 'react-copy-to-clipboard';
66
import { observer } from 'mobx-react';
7-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module './AssetContent.scss' or its co... Remove this comment to see the full error message
87
import styles from './AssetContent.scss';
98
import { hexToString } from '../../utils/strings';
10-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module '../../assets/images/copy-asset... Remove this comment to see the full error message
119
import copyIcon from '../../assets/images/copy-asset.inline.svg';
12-
// @ts-ignore ts-migrate(2307) FIXME: Cannot find module '../../assets/images/check-w.in... Remove this comment to see the full error message
1310
import copyCheckmarkIcon from '../../assets/images/check-w.inline.svg';
1411
import { ASSET_TOKEN_ID_COPY_FEEDBACK } from '../../config/timingConfig';
1512
import type { Asset as AssetProps } from '../../api/assets/types';
@@ -123,7 +120,7 @@ const AssetContent = observer((props: Props) => {
123120
<SVGInline svg={icon} className={iconClassnames} />
124121
</div>
125122
{assetId === 'assetName' && (
126-
<div className={styles.assetASCIIName}>
123+
<div className={styles.assetAsciiName}>
127124
(ASCII: {hexToString(value)})
128125
</div>
129126
)}

0 commit comments

Comments
 (0)