Skip to content

Commit

Permalink
style(public-docsite-v9): fix all lint violations that were triggered…
Browse files Browse the repository at this point in the history
… by switching to v9 ruleset
  • Loading branch information
Hotell committed May 22, 2024
1 parent a6c832e commit aa921c6
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { Button, mergeClasses, Tooltip } from '@fluentui/react-components';
import { V0IconComponent, V9IconComponent } from './types';
import { useComparisonTileStyles } from './ComparisonTile.styles';

interface IComparisonTileProps {
interface ComparisonTileProps {
V0Icon: V0IconComponent;
V9Icon?: V9IconComponent;
}

export const ComparisonTile: React.FC<IComparisonTileProps> = ({ V0Icon, V9Icon }) => {
export const ComparisonTile: React.FC<ComparisonTileProps> = ({ V0Icon, V9Icon }) => {
const noV9Icon = !V9Icon;

const tooltipWarningContent = <ul>{noV9Icon && <li>No equivalent icon available</li>}</ul>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { V0IconComponent, V9IconComponent } from './types';

const ComparisonTile = React.memo(ComparisonTileBase);

interface IIconGridProps {
interface IconGridProps {
entries: {
V0Icon: V0IconComponent;
V9Icon?: V9IconComponent;
Expand All @@ -15,11 +15,11 @@ interface IIconGridProps {

const ROW_SIZE = 3;

interface IRowProps extends ListChildComponentProps {
data: IIconGridProps['entries'];
interface RowProps extends ListChildComponentProps {
data: IconGridProps['entries'];
}

const Row = ({ index, style, data }: IRowProps) => {
const Row = ({ index, style, data }: RowProps) => {
const start = index * ROW_SIZE;
const items = data.slice(start, start + 3);
return (
Expand All @@ -33,7 +33,7 @@ const Row = ({ index, style, data }: IRowProps) => {
);
};

export const IconGrid: React.FC<IIconGridProps> = ({ entries }) => {
export const IconGrid: React.FC<IconGridProps> = ({ entries }) => {
return (
<List width="100%" itemCount={entries.length / ROW_SIZE} height={600} itemData={entries} itemSize={110}>
{Row}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { ColorCompare } from './ColorCompare';
import { darkThemeBrandMap, lightThemeBrandMap } from './themeMap';

import { makeStyles, shorthands } from '@griffel/react';
import { makeStyles, shorthands } from '@fluentui/react-components';

const useStyles = makeStyles({
root: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { ColorCompare } from './ColorCompare';
import { namedColorMap } from './themeMap';

import { makeStyles, shorthands } from '@griffel/react';
import { makeStyles, shorthands } from '@fluentui/react-components';

const useStyles = makeStyles({
root: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { ColorCompare } from './ColorCompare';
import { lightThemeNeutralMap, darkThemeNeutralMap } from './themeMap';

import { makeStyles, shorthands } from '@griffel/react';
import { makeStyles, shorthands } from '@fluentui/react-components';

const useStyles = makeStyles({
root: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { ColorCompare } from './ColorCompare';
import { semanticToAliasMap } from './themeMap';

import { makeStyles, shorthands } from '@griffel/react';
import { makeStyles, shorthands } from '@fluentui/react-components';

const useStyles = makeStyles({
root: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react';

import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
import { Input, tokens, typographyStyles } from '@fluentui/react-components';
import { makeStyles, mergeClasses, shorthands, Input, tokens, typographyStyles } from '@fluentui/react-components';

const useStyles = makeStyles({
root: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ type Box = {
text: 'string';
};

interface IWhatsNewBoxProps {
interface WhatsNewBoxProps {
boxes: Box[];
}

export const WhatsNewBoxes: React.FC<IWhatsNewBoxProps> = props => {
export const WhatsNewBoxes: React.FC<WhatsNewBoxProps> = props => {
const styles = useWhatsNewStyles();

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { DocsContainer, DocsContextProps } from '@storybook/addon-docs';
import { FluentStoryContext } from '@fluentui/react-storybook-addon';
import { webLightTheme, FluentProvider } from '@fluentui/react-components';

interface IFluentDocsContainerProps {
interface FluentDocsContainerProps {
context: FluentStoryContext & DocsContextProps;
}

/**
* A container that wraps storybook's native docs container to add extra components to the docs experience
*/
export const FluentDocsContainer: React.FC<IFluentDocsContainerProps> = ({ children, context }) => {
export const FluentDocsContainer: React.FC<FluentDocsContainerProps> = ({ children, context }) => {
return (
<>
{/** TODO add table of contents */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import {
PRIMARY_STORY,
Stories,
} from '@storybook/addon-docs';
import { makeStyles, shorthands } from '@griffel/react';
import { tokens, Link, Text } from '@fluentui/react-components';
import { makeStyles, shorthands, tokens, Link, Text } from '@fluentui/react-components';
import { DIR_ID, THEME_ID, themes } from '@fluentui/react-storybook-addon';
import { DirSwitch } from './DirSwitch.stories';
import { ThemePicker } from './ThemePicker.stories';
Expand Down
2 changes: 1 addition & 1 deletion apps/public-docsite-v9/src/DocsComponents/Toc.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { addons } from '@storybook/addons';
import { NAVIGATE_URL } from '@storybook/core-events';
import { makeStyles, shorthands } from '@griffel/react';
import { makeStyles, shorthands } from '@fluentui/react-components';
import { useRef } from 'react';

const useTocStyles = makeStyles({
Expand Down

0 comments on commit aa921c6

Please sign in to comment.