Skip to content

Commit

Permalink
chore: fix import order with biomejs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSisb committed Sep 22, 2023
1 parent 7f7ef0f commit 5ca9dc5
Show file tree
Hide file tree
Showing 1,318 changed files with 3,224 additions and 3,224 deletions.
2 changes: 1 addition & 1 deletion .danger/__tests__/changesets-that-need-core-check.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import changesetsThatNeedCoreCheck, {
shouldFlagChangeset,
getChangesetsNotTaggingCore,
shouldFlagChangeset,
} from '../changesets-that-need-core-check';

declare const global: any;
Expand Down
2 changes: 1 addition & 1 deletion .danger/__tests__/missing-upgrade-guide-check.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import missingUpgradeGuideCheck, { UPGRADE_GUIDE_PAGE_FILE, FAIL_MESSAGE } from '../missing-upgrade-guide-check';
import missingUpgradeGuideCheck, { FAIL_MESSAGE, UPGRADE_GUIDE_PAGE_FILE } from '../missing-upgrade-guide-check';
declare const global: any;

describe('missingUpgradeGuideCheck()', () => {
Expand Down
8 changes: 4 additions & 4 deletions .danger/__tests__/utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
getPublicPackages,
getRepoPackagePath,
getPackagePaths,
getPublicPackageFilesFromFiles,
getChangesetsFromFiles,
getPackJsonsFromFiles,
getPackageNameFromPath,
getPackagePaths,
getPublicPackageFilesFromFiles,
getPublicPackages,
getRepoPackagePath,
getUnpublishedPackageNames,
} from '../utils';

Expand Down
2 changes: 1 addition & 1 deletion .danger/changesets-that-need-core-check.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as fs from 'fs';
import { getChangesetsFromFiles } from './utils';
// you kind of have to treat Danger plugins as global?
// https://danger.systems/js/usage/extending-danger.html#writing-your-plugin
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
import { getChangesetsFromFiles } from './utils';
declare const danger: DangerDSLType;
export declare function fail(message: string): void;

Expand Down
10 changes: 5 additions & 5 deletions .danger/missing-changesets-check.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as fs from 'fs';
// you kind of have to treat Danger plugins as global?
// https://danger.systems/js/usage/extending-danger.html#writing-your-plugin
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
import type { PackageShape } from '../tools/utils/getRepoPackages';
import {
getChangesetsFromFiles,
getPublicPackageFilesFromFiles,
getPackagePaths,
getPublicPackageFilesFromFiles,
getPublicPackages,
getUnpublishedPackageNames,
} from './utils';
import type { PackageShape } from '../tools/utils/getRepoPackages';
// you kind of have to treat Danger plugins as global?
// https://danger.systems/js/usage/extending-danger.html#writing-your-plugin
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
declare const danger: DangerDSLType;
export declare function fail(message: string): void;

Expand Down
2 changes: 1 addition & 1 deletion .danger/missing-upgrade-guide-check.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as fs from 'fs';
import { getChangesetsFromFiles } from './utils';
// you kind of have to treat Danger plugins as global?
// https://danger.systems/js/usage/extending-danger.html#writing-your-plugin
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
import { getChangesetsFromFiles } from './utils';
declare const danger: DangerDSLType;
export declare function fail(message: string): void;

Expand Down
2 changes: 1 addition & 1 deletion .danger/package-json-check.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getPackJsonsFromFiles } from './utils';
// you kind of have to treat Danger plugins as global?
// https://danger.systems/js/usage/extending-danger.html#writing-your-plugin
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
import { getPackJsonsFromFiles } from './utils';
declare const danger: DangerDSLType;
export declare function warn(message: string): void;

Expand Down
2 changes: 1 addition & 1 deletion .danger/pin-external-deps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
import fs from 'fs';
import { DangerDSLType } from 'danger/distribution/dsl/DangerDSL';
import { getPackJsonsFromFiles } from './utils';

// you kind of have to treat Danger plugins as global?
Expand Down
2 changes: 1 addition & 1 deletion .storybook/RenderPerformanceProfiler.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isChromatic from 'chromatic';
/// <reference types="vite/client" />
import React from 'react';
import isChromatic from 'chromatic';
import { version } from '../packages/paste-core/core-bundle/package.json';

const trackRenderPerformance = (data) => {
Expand Down
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import type { StorybookConfig } from '@storybook/react-vite';
import { mergeConfig } from 'vite';
import turbosnap from 'vite-plugin-turbosnap';
import path from 'path';
const config: StorybookConfig = {
stories: [
'../packages/**/*.stories.@(js|jsx|ts|tsx|mdx)',
Expand Down
12 changes: 6 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import isChromatic from 'chromatic';
import { StylingGlobals } from '@twilio-paste/styling-library';
import { Theme } from '@twilio-paste/theme';
import { Box } from '@twilio-paste/box';
import { Column, Grid } from '@twilio-paste/grid';
import { Stack } from '@twilio-paste/stack';
import { Grid, Column } from '@twilio-paste/grid';
import { RenderPerformanceProfiler } from './RenderPerformanceProfiler';
import { StylingGlobals } from '@twilio-paste/styling-library';
import { Theme } from '@twilio-paste/theme';
import isChromatic from 'chromatic';
import React from 'react';
import { SITE_BREAKPOINTS } from '../packages/paste-website/src/constants';
import { RenderPerformanceProfiler } from './RenderPerformanceProfiler';

// disable animations in test environments
const isTestEnvironment = isChromatic() || process.env.NODE_ENV === 'test';
Expand Down
6 changes: 3 additions & 3 deletions apps/vs-code-intellisense/src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import camelCase from 'lodash.camelcase';
import kebabCase from 'lodash.kebabcase';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import camelCase from 'lodash.camelcase';
import kebabCase from 'lodash.kebabcase';

import { pasteTokenAttributes } from './tokens';
import { PasteToken } from './types';
import { getColorPreview, getThemeSetting, getThemeTokens, remToPx, isColorCategory } from './utils';
import { getColorPreview, getThemeSetting, getThemeTokens, isColorCategory, remToPx } from './utils';

const DIVIDER = `___\n`;

Expand Down
2 changes: 1 addition & 1 deletion apps/vs-code-intellisense/src/test/suite/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from 'path';
import Mocha from 'mocha';
import glob from 'glob';
import Mocha from 'mocha';

export function run(): Promise<void> {
// Create the mocha test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import assert from 'assert';

import { getThemeTokens } from '../../../utils';
import {
darkThemeTokens,
defaultThemeTokens,
Expand All @@ -10,6 +9,7 @@ import {
twilioThemeTokens,
} from '../../../tokens';
import { Theme } from '../../../types';
import { getThemeTokens } from '../../../utils';

suite('getThemeTokens', () => {
['Default', 'default', undefined, null, 'foo'].forEach((theme) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'assert';

import { isColorCategory } from '../../../utils/is-color-category';
import { TokenCategory } from '../../../types';
import { isColorCategory } from '../../../utils/is-color-category';

const COLOR_CATEGORIES: TokenCategory[] = ['border-color', 'background-color', 'color', 'text-color'];

Expand Down
8 changes: 4 additions & 4 deletions dangerfile.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// https://danger.systems/js/reference.html
import packageJsonCheck from './.danger/package-json-check';
import missingChangesetsCheck from './.danger/missing-changesets-check';
import changesetsThatNeedCoreCheck from './.danger/changesets-that-need-core-check';
import missingChangesetsCheck from './.danger/missing-changesets-check';
import missingUpgradeGuide from './.danger/missing-upgrade-guide-check';
import websitePageVrtCheck from './.danger/website-page-vrt-check';
// https://danger.systems/js/reference.html
import packageJsonCheck from './.danger/package-json-check';
import pinExternalDeps from './.danger/pin-external-deps';
import websitePageVrtCheck from './.danger/website-page-vrt-check';
import { getRepoPackages } from './tools/utils/getRepoPackages';
import type { PackageShape } from './tools/utils/getRepoPackages';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore type declaration warning for these token fixtures
import { tokens } from '../__fixtures__/tokens';
import * as RawJSON from '../__fixtures__/tokens.raw.json';
import * as RawExtraJSON from '../__fixtures__/tokensWithExtraPairings.raw.json';
import {
convertRawTokenJSONToArray,
getContrastRatingForTokenPairing,
getTokensWithDataVisualizationContrastRequirements,
getTokensWithTextContrastRequirements,
getTokensWithUIControlContrastRequirements,
getTokensWithDataVisualizationContrastRequirements,
convertRawTokenJSONToArray,
} from '../src/utils';
import * as RawJSON from '../__fixtures__/tokens.raw.json';
import * as RawExtraJSON from '../__fixtures__/tokensWithExtraPairings.raw.json';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore type declaration warning for these token fixtures
import { tokens } from '../__fixtures__/tokens';

describe('convertRawTokenJSONToArray', () => {
test('it should convert raw JSON to an array of tokens', () => {
Expand Down
52 changes: 26 additions & 26 deletions packages/paste-color-contrast-utils/__tests__/themeContrast.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import {
backgroundColors,
borderColors,
borderWidths,
radii,
boxShadows,
dataVisualization,
fonts,
fontSizes,
fontWeights,
fonts,
lineHeights,
boxShadows,
radii,
sizings,
spacings,
textColors,
Expand All @@ -18,55 +18,55 @@ import {
backgroundColors as darkBackgroundColors,
borderColors as darkBorderColors,
borderWidths as darkBorderWidths,
radii as darkRadii,
boxShadows as darkBoxShadows,
dataVisualization as darkDataVisualization,
fonts as darkFonts,
fontSizes as darkFontSizes,
fontWeights as darkFontWeights,
fonts as darkFonts,
lineHeights as darkLineHeights,
boxShadows as darkBoxShadows,
radii as darkRadii,
sizings as darkSizings,
spacings as darkSpacings,
textColors as darkTextColors,
zIndices as darkZIndices,
} from '@twilio-paste/design-tokens/dist/themes/dark/tokens.common';
import {
backgroundColors as twilioBackgroundColors,
borderColors as twilioBorderColors,
borderWidths as twilioBorderWidths,
radii as twilioRadii,
dataVisualization as twilioDataVisualization,
fonts as twilioFonts,
fontSizes as twilioFontSizes,
fontWeights as twilioFontWeights,
lineHeights as twilioLineHeights,
boxShadows as twilioBoxShadows,
sizings as twilioSizings,
spacings as twilioSpacings,
textColors as twilioTextColors,
zIndices as twilioZIndices,
} from '@twilio-paste/design-tokens/dist/themes/twilio/tokens.common';
import {
backgroundColors as twilioDarkBackgroundColors,
borderColors as twilioDarkBorderColors,
borderWidths as twilioDarkBorderWidths,
radii as twilioDarkRadii,
boxShadows as twilioDarkBoxShadows,
dataVisualization as twilioDarkDataVisualization,
fonts as twilioDarkFonts,
fontSizes as twilioDarkFontSizes,
fontWeights as twilioDarkFontWeights,
fonts as twilioDarkFonts,
lineHeights as twilioDarkLineHeights,
boxShadows as twilioDarkBoxShadows,
radii as twilioDarkRadii,
sizings as twilioDarkSizings,
spacings as twilioDarkSpacings,
textColors as twilioDarkTextColors,
zIndices as twilioDarkZIndices,
} from '@twilio-paste/design-tokens/dist/themes/twilio-dark/tokens.common';
import {
backgroundColors as twilioBackgroundColors,
borderColors as twilioBorderColors,
borderWidths as twilioBorderWidths,
boxShadows as twilioBoxShadows,
dataVisualization as twilioDataVisualization,
fontSizes as twilioFontSizes,
fontWeights as twilioFontWeights,
fonts as twilioFonts,
lineHeights as twilioLineHeights,
radii as twilioRadii,
sizings as twilioSizings,
spacings as twilioSpacings,
textColors as twilioTextColors,
zIndices as twilioZIndices,
} from '@twilio-paste/design-tokens/dist/themes/twilio/tokens.common';

import {
getContrastRatingsOfTokensWithDataVisualizationContrastRequirements,
getContrastRatingsOfTokensWithTextContrastRequirements,
getContrastRatingsOfTokensWithUIControlContrastRequirements,
getContrastRatingsOfTokensWithDataVisualizationContrastRequirements,
} from '../src/utils';

const defaultThemeTextColorContrastRatings = getContrastRatingsOfTokensWithTextContrastRequirements({
Expand Down
6 changes: 3 additions & 3 deletions packages/paste-color-contrast-utils/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import DefaultRawTokenJSON from '@twilio-paste/design-tokens/dist/tokens.raw.json';
import type { DesignToken, DesignTokensJSON, TokenPairContrastRating } from '@twilio-paste/design-tokens/types';
import type { AllGenericTokens, GenericTokensShape } from '@twilio-paste/design-tokens/types/GenericTokensShape';
import ColorCombos from 'color-combos';
import type { ColorCombo } from 'color-combos';
import type { GenericTokensShape, AllGenericTokens } from '@twilio-paste/design-tokens/types/GenericTokensShape';
import type { DesignToken, DesignTokensJSON, TokenPairContrastRating } from '@twilio-paste/design-tokens/types';
import DefaultRawTokenJSON from '@twilio-paste/design-tokens/dist/tokens.raw.json';
import camelCase from 'lodash/camelCase';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { act, render, screen } from '@testing-library/react';
import * as React from 'react';
import { render, screen, act } from '@testing-library/react';

import { AccountSwitcherMenu } from '../stories/AccountSwitcher.stories';
import { CustomElementName, DefaultElementName } from '../stories/AccountSwitcher.customization.stories';
import { AccountSwitcherMenu } from '../stories/AccountSwitcher.stories';

describe('AccountSwitcher', () => {
describe('element naming', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Menu } from '@twilio-paste/menu';
import type { MenuProps } from '@twilio-paste/menu';
import * as React from 'react';

export interface AccountSwitcherProps extends MenuProps {
children: NonNullable<React.ReactNode>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { MenuBadge } from '@twilio-paste/menu';
import type { MenuBadgeProps } from '@twilio-paste/menu';
import * as React from 'react';

export interface AccountSwitcherBadgeProps extends Omit<MenuBadgeProps, 'variant'> {
children: NonNullable<React.ReactNode>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { MenuGroup } from '@twilio-paste/menu';
import type { MenuGroupProps } from '@twilio-paste/menu';
import * as React from 'react';

export type AccountSwitcherGroupProps = MenuGroupProps;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { MenuItem } from '@twilio-paste/menu';
import type { MenuItemProps } from '@twilio-paste/menu';
import * as React from 'react';

export interface AccountSwitcherItemProps extends MenuItemProps {
children: NonNullable<React.ReactNode>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { MenuItemRadio } from '@twilio-paste/menu';
import type { MenuItemRadioProps } from '@twilio-paste/menu';
import * as React from 'react';

export interface AccountSwitcherItemRadioProps extends MenuItemRadioProps {
children: NonNullable<React.ReactNode>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { MenuSeparator } from '@twilio-paste/menu';
import type { MenuSeparatorProps } from '@twilio-paste/menu';
import * as React from 'react';

export type AccountSwitcherSeparatorProps = MenuSeparatorProps;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import type { StoryFn } from '@storybook/react';
import { CustomizationProvider } from '@twilio-paste/customization';
import * as React from 'react';

import {
AccountSwitcher,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import type { StoryFn } from '@storybook/react';
import * as React from 'react';

import {
AccountSwitcher,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { render, screen } from '@testing-library/react';
import * as React from 'react';

import { CustomizedAlertDialog, CustomizedDestructiveAlertDialog } from '../stories/index.stories';

Expand Down
Loading

0 comments on commit 5ca9dc5

Please sign in to comment.