diff --git a/.github/workflows/typoChecker.yml b/.github/workflows/typoChecker.yml new file mode 100644 index 0000000000..a4049e04f2 --- /dev/null +++ b/.github/workflows/typoChecker.yml @@ -0,0 +1,13 @@ +name: Typo Checker +on: [pull_request] + +jobs: + run: + name: Typo Checker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use custom config file + uses: crate-ci/typos@master + with: + config: ./.typos.toml diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000000..c0599acdbb --- /dev/null +++ b/.typos.toml @@ -0,0 +1,7 @@ +[files] +extend-exclude = [ + 'CHANGELOG.md', + 'smarthr-ui-props.json', +] + +[default.extend-words] diff --git a/packages/smarthr-ui/src/components/AppHeader/stories/VRTAppHeader.stories.tsx b/packages/smarthr-ui/src/components/AppHeader/stories/VRTAppHeader.stories.tsx index 985ccd40a8..829ecce2fc 100644 --- a/packages/smarthr-ui/src/components/AppHeader/stories/VRTAppHeader.stories.tsx +++ b/packages/smarthr-ui/src/components/AppHeader/stories/VRTAppHeader.stories.tsx @@ -32,7 +32,7 @@ export const VRTNameOnly: Story = { empCode: null, firstName: '須磨', lastName: '栄子', - accountUrl: 'https://exmaple.com', + accountUrl: 'https://example.com', }, }, } @@ -44,7 +44,7 @@ export const VRTEmpCodeOnly: Story = { empCode: '001', firstName: null, lastName: null, - accountUrl: 'https://exmaple.com', + accountUrl: 'https://example.com', }, }, } @@ -56,7 +56,7 @@ export const VRTEmailOnly: Story = { empCode: null, firstName: null, lastName: null, - accountUrl: 'https://exmaple.com', + accountUrl: 'https://example.com', }, }, } @@ -68,7 +68,7 @@ export const VRTNoUserInfo: Story = { empCode: null, firstName: null, lastName: null, - accountUrl: 'https://exmaple.com', + accountUrl: 'https://example.com', }, }, } @@ -116,7 +116,7 @@ export const VRTReleaseNoteLoading: Story = { releaseNote: { loading: true, links: [], - indexUrl: 'https://exmaple.com', + indexUrl: 'https://example.com', }, }, play: async ({ canvasElement }) => { @@ -130,7 +130,7 @@ export const VRTReleaseNoteError: Story = { releaseNote: { error: true, links: [], - indexUrl: 'https://exmaple.com', + indexUrl: 'https://example.com', }, }, play: async ({ canvasElement }) => { diff --git a/packages/smarthr-ui/src/components/AppHeader/stories/args.tsx b/packages/smarthr-ui/src/components/AppHeader/stories/args.tsx index e217aa6285..f094b859a1 100644 --- a/packages/smarthr-ui/src/components/AppHeader/stories/args.tsx +++ b/packages/smarthr-ui/src/components/AppHeader/stories/args.tsx @@ -36,8 +36,8 @@ export const args: ComponentProps = { ], currentTenantId: 'tenant-1', onTenantSelect: action('テナント選択'), - schoolUrl: 'https://exmaple.com', - helpPageUrl: 'https://exmaple.com', + schoolUrl: 'https://example.com', + helpPageUrl: 'https://example.com', locale: { selectedLocale: 'ja', onSelectLocale: action('locale'), @@ -47,18 +47,18 @@ export const args: ComponentProps = { empCode: '001', firstName: '須磨', lastName: '栄子', - accountUrl: 'https://exmaple.com', + accountUrl: 'https://example.com', }, desktopAdditionalContent: desktopAdditionalContent, navigations: [ { children: 'aタグ', - href: 'https://exmaple.com', + href: 'https://example.com', }, { children: 'カスタムタグ', elementAs: CustomLink, - to: 'https://exmaple.com', + to: 'https://example.com', }, { children: 'ボタン', @@ -69,12 +69,12 @@ export const args: ComponentProps = { childNavigations: [ { children: 'aタグ', - href: 'https://exmaple.com', + href: 'https://example.com', }, { children: 'カスタムタグ', elementAs: CustomLink, - to: 'https://exmaple.com', + to: 'https://example.com', }, { children: 'ボタン', @@ -90,12 +90,12 @@ export const args: ComponentProps = { childNavigations: [ { children: 'グループ1_アイテム1', - href: 'https://exmaple.com', + href: 'https://example.com', current: true, }, { children: 'グループ1_アイテム2', - href: 'https://exmaple.com', + href: 'https://example.com', }, ], }, @@ -104,11 +104,11 @@ export const args: ComponentProps = { childNavigations: [ { children: 'グループ2_アイテム1', - href: 'https://exmaple.com', + href: 'https://example.com', }, { children: 'グループ2_アイテム2', - href: 'https://exmaple.com', + href: 'https://example.com', }, ], }, @@ -122,18 +122,18 @@ export const args: ComponentProps = { links: [ { title: 'リリースノート1', - url: 'https://exmaple.com', + url: 'https://example.com', }, { title: 'リリースノート2', - url: 'https://exmaple.com', + url: 'https://example.com', }, { title: 'リリースノート3', - url: 'https://exmaple.com', + url: 'https://example.com', }, ], - indexUrl: 'https://exmaple.com', + indexUrl: 'https://example.com', }, features: [ buildFeature(1, '従業員リスト', false), diff --git a/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviAnchor.stories.tsx b/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviAnchor.stories.tsx index b17a3bf317..6cfb897898 100644 --- a/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviAnchor.stories.tsx +++ b/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviAnchor.stories.tsx @@ -6,7 +6,7 @@ import { AppNaviAnchor } from '../AppNaviAnchor' import type { Meta, StoryObj } from '@storybook/react' -const _iconOptoins = { +const _iconOptions = { なし: undefined, あり: FaGearIcon, } @@ -28,8 +28,8 @@ export default { argTypes: { icon: { control: 'radio', - options: Object.keys(_iconOptoins), - mapping: _iconOptoins, + options: Object.keys(_iconOptions), + mapping: _iconOptions, }, elementAs: { control: 'radio', @@ -64,7 +64,7 @@ export const Href: StoryObj = { export const Icon: StoryObj = { name: 'icon', args: { - icon: _iconOptoins['あり'], + icon: _iconOptions['あり'], }, } diff --git a/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviButton.stories.tsx b/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviButton.stories.tsx index d6c08c296d..45494c2e4a 100644 --- a/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviButton.stories.tsx +++ b/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviButton.stories.tsx @@ -7,7 +7,7 @@ import { AppNaviButton } from '../AppNaviButton' import type { Meta, StoryObj } from '@storybook/react' -const _iconOptoins = { +const _iconOptions = { なし: undefined, あり: FaGearIcon, } @@ -19,8 +19,8 @@ export default { argTypes: { icon: { control: 'radio', - options: Object.keys(_iconOptoins), - mapping: _iconOptoins, + options: Object.keys(_iconOptions), + mapping: _iconOptions, }, }, args: { @@ -40,7 +40,7 @@ export const Playground: StoryObj = {} export const Icon: StoryObj = { name: 'icon', args: { - icon: _iconOptoins['あり'], + icon: _iconOptions['あり'], }, } diff --git a/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviCustomTag.stories.tsx b/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviCustomTag.stories.tsx index ee7c078042..ffe8badce8 100644 --- a/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviCustomTag.stories.tsx +++ b/packages/smarthr-ui/src/components/AppNavi/stories/AppNaviCustomTag.stories.tsx @@ -6,7 +6,7 @@ import { AppNaviCustomTag } from '../AppNaviCustomTag' import type { Meta, StoryObj } from '@storybook/react' -const _iconOptoins = { +const _iconOptions = { なし: undefined, あり: FaGearIcon, } @@ -29,8 +29,8 @@ export default { argTypes: { icon: { control: 'radio', - options: Object.keys(_iconOptoins), - mapping: _iconOptoins, + options: Object.keys(_iconOptions), + mapping: _iconOptions, }, }, args: { @@ -51,7 +51,7 @@ export const Playground: StoryObj = {} export const Icon: StoryObj = { name: 'icon', args: { - icon: _iconOptoins['あり'], + icon: _iconOptions['あり'], }, } diff --git a/packages/smarthr-ui/src/components/Button/ButtonWrapper.tsx b/packages/smarthr-ui/src/components/Button/ButtonWrapper.tsx index 7b60b3f91d..d4d83f99ef 100644 --- a/packages/smarthr-ui/src/components/Button/ButtonWrapper.tsx +++ b/packages/smarthr-ui/src/components/Button/ButtonWrapper.tsx @@ -230,10 +230,10 @@ const button = tv({ 'shr-text-black', 'focus-visible:shr-border-darken', 'focus-visible:shr-bg-white-darken', - 'focus-visible:constrast-more:shr-border-high-contrast', + 'focus-visible:contrast-more:shr-border-high-contrast', 'hover:shr-border-darken', 'hover:shr-bg-white-darken', - 'hover:constrast-more:shr-border-high-contrast', + 'hover:contrast-more:shr-border-high-contrast', ], }, { diff --git a/packages/smarthr-ui/src/components/InformationPanel/stories/VRTInformationPanel.stories.tsx b/packages/smarthr-ui/src/components/InformationPanel/stories/VRTInformationPanel.stories.tsx index 854c1441bd..0fdd0e4ea2 100644 --- a/packages/smarthr-ui/src/components/InformationPanel/stories/VRTInformationPanel.stories.tsx +++ b/packages/smarthr-ui/src/components/InformationPanel/stories/VRTInformationPanel.stories.tsx @@ -9,13 +9,13 @@ import type { Meta } from '@storybook/react' * $ pict information-panel.pict * type bold togglable active * success false true true - * infor false false false + * info false false false * error true false true * sync false false false * sync false true false * success true false false * warning true true true - * infor false true true + * info false true true * error false true false * warning false false false * sync false false true diff --git a/packages/smarthr-ui/src/components/InformationPanel/stories/information-panel.pict b/packages/smarthr-ui/src/components/InformationPanel/stories/information-panel.pict index da1e18eae3..241ea09564 100644 --- a/packages/smarthr-ui/src/components/InformationPanel/stories/information-panel.pict +++ b/packages/smarthr-ui/src/components/InformationPanel/stories/information-panel.pict @@ -1,6 +1,6 @@ -type: success, infor, warning, error, sync +type: success, info, warning, error, sync bold: false, true togglable: false (10), true active: false, true (10) -IF [bold] = "true" THEN [type] IN {"success", "warning", "error"}; \ No newline at end of file +IF [bold] = "true" THEN [type] IN {"success", "warning", "error"}; diff --git a/packages/smarthr-ui/src/components/TabBar/stories/VRTTabBar.stories.tsx b/packages/smarthr-ui/src/components/TabBar/stories/VRTTabBar.stories.tsx index 41f2e87b92..11e5c55e9f 100644 --- a/packages/smarthr-ui/src/components/TabBar/stories/VRTTabBar.stories.tsx +++ b/packages/smarthr-ui/src/components/TabBar/stories/VRTTabBar.stories.tsx @@ -13,7 +13,7 @@ import type { Meta, StoryObj } from '@storybook/react' export default { title: 'Navigation(ナビゲーション)/TabBar/VRT', /* ペアワイズ法による網羅 - * bordered selected diasbled suffix disabledDetail + * bordered selected disabled suffix disabledDetail * false false false あり なし * false true true なし あり * true true true あり なし diff --git a/packages/smarthr-ui/src/themes/__tests__/createFontSize.ts b/packages/smarthr-ui/src/themes/__tests__/createFontSize.ts index 4079d243c0..85258a39c5 100644 --- a/packages/smarthr-ui/src/themes/__tests__/createFontSize.ts +++ b/packages/smarthr-ui/src/themes/__tests__/createFontSize.ts @@ -53,7 +53,7 @@ describe('createFontSize', () => { expect(actual.XXL).toBe(`${8 / 5}rem`) }) - it('the value from scaleFactor wil be overridden if a deprecated abstract value is specified', () => { + it('the value from scaleFactor will be overridden if a deprecated abstract value is specified', () => { const actual = createFontSize({ scaleFactor: 8, S: '1.1rem',