Skip to content

Commit

Permalink
Migrate from // prettier-ignore to // biome-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywiebe committed Oct 24, 2024
1 parent f48d54d commit 363a63c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 37 deletions.
2 changes: 1 addition & 1 deletion config/test/log-on-fail-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LogOnFailedTestReporter extends DefaultReporter {
const testFailed = result.numFailingTests > 0;

if (testFailed && consoleBuffer && consoleBuffer.length) {
// prettier-ignore
// biome-ignore format: keep these on the same line
this.log(
` ${TITLE_BULLET}Console\n\n${getConsoleOutput(
consoleBuffer,
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus-linter/src/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type RuleCheckReturnType =
// This is the return type of the lint detection function passed as the 4th
// argument to the Rule() constructor. It can return null or a string or an
// object containing a string and two numbers.
// prettier-ignore
// biome-ignore format: keep these on the same line
// (prettier formats this in a way that ka-lint does not like)
type LintTesterReturnType = string | {
message: string,
Expand Down
71 changes: 37 additions & 34 deletions packages/perseus/src/perseus-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,74 +194,77 @@ type WidgetOptions<Type extends string, Options> = {
version?: Version;
};

// prettier-ignore
// biome-ignore format: keep these on the same line
export type CategorizerWidget = WidgetOptions<'categorizer', PerseusCategorizerWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type CSProgramWidget = WidgetOptions<'cs-program', PerseusCSProgramWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type DefinitionWidget = WidgetOptions<'definition', PerseusDefinitionWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type DropdownWidget = WidgetOptions<'dropdown', PerseusDropdownWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type ExplanationWidget = WidgetOptions<'explanation', PerseusExplanationWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type ExpressionWidget = WidgetOptions<'expression', PerseusExpressionWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type GradedGroupSetWidget = WidgetOptions<'graded-group-set', PerseusGradedGroupSetWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type GradedGroupWidget = WidgetOptions<'graded-group', PerseusGradedGroupWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type GrapherWidget = WidgetOptions<'grapher', PerseusGrapherWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type GroupWidget = WidgetOptions<'group', PerseusGroupWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type IFrameWidget = WidgetOptions<'iframe', PerseusIFrameWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type ImageWidget = WidgetOptions<'image', PerseusImageWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type InteractionWidget = WidgetOptions<'interaction', PerseusInteractionWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type InteractiveGraphWidget = WidgetOptions<'interactive-graph', PerseusInteractiveGraphWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type LabelImageWidget = WidgetOptions<'label-image', PerseusLabelImageWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type MatcherWidget = WidgetOptions<'matcher', PerseusMatcherWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type MatrixWidget = WidgetOptions<'matrix', PerseusMatrixWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type MeasurerWidget = WidgetOptions<'measurer', PerseusMeasurerWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type NumberLineWidget = WidgetOptions<'number-line', PerseusNumberLineWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type NumericInputWidget = WidgetOptions<'numeric-input', PerseusNumericInputWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type OrdererWidget = WidgetOptions<'orderer', PerseusOrdererWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type PassageRefWidget = WidgetOptions<'passage-ref', PerseusPassageRefWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type PassageWidget = WidgetOptions<'passage', PerseusPassageWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type PhetSimulationWidget = WidgetOptions<'phet-simulation', PerseusPhetSimulationWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type PlotterWidget = WidgetOptions<'plotter', PerseusPlotterWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type PythonProgramWidget = WidgetOptions<'python-program', PerseusPythonProgramWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type RadioWidget = WidgetOptions<'radio', PerseusRadioWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type SorterWidget = WidgetOptions<'sorter', PerseusSorterWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type TableWidget = WidgetOptions<'table', PerseusTableWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type InputNumberWidget = WidgetOptions<'input-number', PerseusInputNumberWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type MoleculeRendererWidget = WidgetOptions<'molecule-renderer', PerseusMoleculeRendererWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type RefTargetWidget = WidgetOptions<'passage-ref-target', PerseusPassageRefTargetWidgetOptions>;
// prettier-ignore
// biome-ignore format: keep these on the same line
export type VideoWidget = WidgetOptions<'video', PerseusVideoWidgetOptions>;
//prettier-ignore
export type AutoCorrectWidget = WidgetOptions<'deprecated-standin', PerseusWidgetOptions>;
export type AutoCorrectWidget = WidgetOptions<
"deprecated-standin",
PerseusWidgetOptions
>;

export type PerseusWidget =
| CategorizerWidget
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus/src/widgets/grapher/util.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ export const allTypes: any = _.keys(functionTypeMapping);
type FunctionTypeMappingKeys = keyof typeof functionTypeMapping;

type ConditionalGraderType<T extends FunctionTypeMappingKeys> =
// prettier-ignore
// biome-ignore format: keep these on the same line
T extends "linear" ? LinearType
: T extends "quadratic" ? QuadraticType
: T extends "sinusoid" ? SinusoidType
Expand Down

0 comments on commit 363a63c

Please sign in to comment.