Skip to content

Commit

Permalink
Merge pull request #990 from cardstack/fix-type-imports
Browse files Browse the repository at this point in the history
Fix type import declarations in boxel-ui
  • Loading branch information
ef4 authored Jan 29, 2024
2 parents 3cae4fb + 84a1e2c commit a78fcac
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions packages/boxel-ui/addon/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ export default {
}),
scopedCSS('src'),
],

onLog(level, log, handler) {
if (log.code === 'UNUSED_EXTERNAL_IMPORT') {
// Turn unused external imports from warnings to errors. Warnings
// accumulate and just generate noise. And this is an easily-fixable issue
// usually caused by failing to declare a type import correctly.
level = 'error';
}
handler(level, log);
},
};

function scopedCSS(srcDir) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import FreestyleUsage from 'ember-freestyle/components/freestyle/usage';
import {
type CSSVariableInfo,
cssVariable,
CSSVariableInfo,
} from 'ember-freestyle/decorators/css-variable';

import cssVar from '../../helpers/css-var.ts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import FreestyleUsage from 'ember-freestyle/components/freestyle/usage';
import {
type CSSVariableInfo,
cssVariable,
CSSVariableInfo,
} from 'ember-freestyle/decorators/css-variable';

import cssVar from '../../helpers/css-var.ts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import FreestyleUsage from 'ember-freestyle/components/freestyle/usage';
import {
type CSSVariableInfo,
cssVariable,
CSSVariableInfo,
} from 'ember-freestyle/decorators/css-variable';

import cssVar from '../../helpers/css-var.ts';
Expand Down
2 changes: 1 addition & 1 deletion packages/boxel-ui/addon/src/components/tooltip/usage.gts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { array, fn } from '@ember/helper';
import { on } from '@ember/modifier';
import { action } from '@ember/object';
import { MiddlewareState } from '@floating-ui/dom';
import type { MiddlewareState } from '@floating-ui/dom';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import FreestyleUsage from 'ember-freestyle/components/freestyle/usage';
Expand Down
2 changes: 1 addition & 1 deletion packages/boxel-ui/addon/src/modifiers/set-css-var.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Modifier, { NamedArgs, PositionalArgs } from 'ember-modifier';
import Modifier, { type NamedArgs, type PositionalArgs } from 'ember-modifier';

interface SetCssVarModifierSignature {
Args: {
Expand Down

0 comments on commit a78fcac

Please sign in to comment.