Skip to content

Commit e82e002

Browse files
authored
build: Added additional typescript check in CI builds (#1717)
1 parent c0d9e41 commit e82e002

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
"build:meta": "node scripts/build-stories.mjs",
2626
"watch-meta": "node scripts/stories-watcher.js ",
2727
"watch-scss": "node scripts/styles-watcher.mjs",
28-
"check": "madge --circular --warning --no-spinner --ts-config ./tsconfig.json --extensions ts src/index.ts",
28+
"check-imports": "madge --circular --warning --no-spinner --ts-config ./tsconfig.json --extensions ts src/index.ts",
29+
"check-types": "tsc -p scripts/tsconfig-ci.json",
30+
"check": "npm run check-imports && npm run check-types",
2931
"clean": "npm run clean:dist && npm run clean:styles && npm run clean:docs",
3032
"clean:dist": "rimraf ./dist",
3133
"clean:styles": "rimraf --glob \"src/**/*.css.ts\"",

scripts/tsconfig-ci.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"noEmit": true
5+
}
6+
}

src/components/dialog/dialog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ export default class IgcDialogComponent extends EventEmitterMixin<
241241

242242
protected override render() {
243243
const label = this.ariaLabel ? this.ariaLabel : undefined;
244-
const labelledby = label ? undefined : this.titleId;
244+
const labelledBy = label ? undefined : this.titleId;
245245
const backdropParts = {
246246
backdrop: true,
247247
animating: this.animating,
248248
};
249249
const baseParts = {
250250
base: true,
251-
titled: this.titleElements.length > 0 || this.title,
251+
titled: this.titleElements.length > 0 || !!this.title,
252252
footed: this.footerElements.length > 0 || !this.hideDefaultAction,
253253
};
254254

@@ -261,7 +261,7 @@ export default class IgcDialogComponent extends EventEmitterMixin<
261261
@click=${this.handleClick}
262262
@cancel=${this.handleCancel}
263263
aria-label=${ifDefined(label)}
264-
aria-labelledby=${ifDefined(labelledby)}
264+
aria-labelledby=${ifDefined(labelledBy)}
265265
>
266266
<header part="title" id=${this.titleId}>
267267
<slot name="title"><span>${this.title}</span></slot>

src/components/input/input-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export abstract class IgcInputBaseComponent extends FormAssociatedRequiredMixin(
178178
<div
179179
part=${partMap({
180180
...this.resolvePartNames('container'),
181-
labelled: this.label,
181+
labelled: !!this.label,
182182
})}
183183
>
184184
<div part="start">${this.renderPrefix()}</div>

src/components/select/select.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ export default class IgcSelectComponent extends FormAssociatedRequiredMixin(
593593
}
594594

595595
protected renderToggleIcon() {
596-
const parts = { 'toggle-icon': true, filled: this.value! };
596+
const parts = { 'toggle-icon': true, filled: !!this.value };
597597
const iconHidden = this.open && !isEmpty(this._expandedIconSlot);
598598
const iconExpandedHidden = !iconHidden;
599599

src/components/textarea/textarea.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,8 @@ export default class IgcTextareaComponent extends FormAssociatedRequiredMixin(
471471
<div
472472
part=${partMap({
473473
...this._resolvePartNames(),
474-
labelled: this.label,
475-
placeholder: this.placeholder,
474+
labelled: !!this.label,
475+
placeholder: !!this.placeholder,
476476
})}
477477
>
478478
<div part="start">${this._renderPrefix()}</div>

0 commit comments

Comments
 (0)