Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add codespell linter workflow in CI #1808

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI

on:
pull_request:
branches:
- dev

jobs:
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: crate-ci/typos@master

14 changes: 14 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[default]
check-filename = false

[default.extend-words]
# Don't correct the abbreviation for Haskell.
Hask = "Hask"
AGS = "AGS"

[type.po]
extend-glob = ["*.po", "*.css"]
check-file = false

[files]
extend-exclude = ["po/*.po", "_data/*", "./public/assets/*"]
6 changes: 3 additions & 3 deletions workspaces/cms-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function youtubeVideoIdFromURL(url: string): string | undefined | void {

export function slugify(value: string): string {
return String(value)
.normalize("NFD") // split an accented letter in the base letter and the acent
.normalize("NFD") // split an accented letter in the base letter and the accent
.replace(/[\u0300-\u036f]/g, "") // remove all previously split accents
.toLowerCase()
.trim()
Expand Down Expand Up @@ -89,8 +89,8 @@ export async function getJSON(
return res.json();
}

export const convertStringTagsToArray = (commaSeperatedTags: string = "") => {
return commaSeperatedTags
export const convertStringTagsToArray = (commaSeparatedTags: string = "") => {
return commaSeparatedTags
.replace(/,\s*$/, "")
.split(",")
.map((t: string) => t.trim());
Expand Down
2 changes: 1 addition & 1 deletion workspaces/netlify-cms-auth/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ the CMS auth has a [url callback whitelist](src/callback.ts?plain=63) and is dep
| Name | netlify-cms-auth |
| usage model | Unbound |

### enviroment variables and secrets
### environment variables and secrets
#### in cloudflare
| Name | Type | Description |
|----------------------------|---------|-------------------------------------------------|
Expand Down
6 changes: 3 additions & 3 deletions workspaces/website/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const navigation = definePartsStyle({
},

_expanded: {
bg: "nav-accordian-expanded-bg",
color: "nav-accordian-expanded-fg",
bg: "nav-accordion-expanded-bg",
color: "nav-accordion-expanded-fg",
},
},
});
Expand Down Expand Up @@ -75,7 +75,7 @@ const page = definePartsStyle({

_expanded: {
color: "heading-navy-fg",
// bg: "nav-accordian-expanded-bg",
// bg: "nav-accordion-expanded-bg",
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions workspaces/website/src/components/Layout/Navbar/NavLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const NavLayout = (props: NavLayoutProps) => {
const MenuIcon = isMenuOpen ? HiOutlineXMark : HiBars3;
const { locale } = usePageContext();
const { colorMode, toggleColorMode } = useColorMode();
const toogleTheme = () => {
const toggleTheme = () => {
toggleColorMode();
if (typeof window !== "undefined" && window.gtag) {
window.gtag("event", "theme_change", {
Expand Down Expand Up @@ -65,7 +65,7 @@ export const NavLayout = (props: NavLayoutProps) => {
)
}
aria-label="Toggle color mode"
onClick={toogleTheme}
onClick={toggleTheme}
marginInlineStart="0 !important"
/>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions workspaces/website/src/components/Layout/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const NavBar = ({
onClose();
}, [onClose, pathname]);

const toogleTheme = () => {
const toggleTheme = () => {
toggleColorMode();
if (typeof window !== "undefined" && window.gtag) {
window.gtag("event", "theme_change", {
Expand Down Expand Up @@ -129,7 +129,7 @@ export const NavBar = ({
}
flex="1"
height="100%"
onClick={toogleTheme}
onClick={toggleTheme}
size="lg"
>
{colorMode === "light" ? "Dark" : "Light"} mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Basic = () => (
</ThemeProvider>
);

export const Seperated = () => {
export const Separated = () => {
const [size, setSize] = useState<ListSize>("md");

return (
Expand All @@ -58,7 +58,7 @@ export const Seperated = () => {
</Stack>
</RadioGroup>
<HStack>
<Root heading="List with seperated items" listGap={size}>
<Root heading="List with separated items" listGap={size}>
<Item
link={{
custom_title: "Documentation 2",
Expand Down
12 changes: 6 additions & 6 deletions workspaces/website/src/components/LinkList/LinkList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { ArrowUpIcon } from "./ArrowUpIcon";

export type ListSize = "sm" | "md" | "lg";

const ListContext = createContext<{ listSize: ListSize; isSeperated: boolean }>(
const ListContext = createContext<{ listSize: ListSize; isSeparated: boolean }>(
{
listSize: "md",
isSeperated: false,
isSeparated: false,
}
);
type RootProps = {
Expand Down Expand Up @@ -51,7 +51,7 @@ const Root = (props: RootProps) => {
gap={gap[listGap as ListSize] || "0px"}
>
<ListContext.Provider
value={{ listSize: listSize || "md", isSeperated: !!listGap }}
value={{ listSize: listSize || "md", isSeparated: !!listGap }}
>
{children}
</ListContext.Provider>
Expand Down Expand Up @@ -88,7 +88,7 @@ const getLinkIcon = (iconName?: string) => {
return HiOutlineArrowRightCircle;
};
const Item = ({ subLabel, link, avatar, ...rest }: ItemProps) => {
const { listSize, isSeperated } = useContext(ListContext);
const { listSize, isSeparated } = useContext(ListContext);
const isLinkisExternal = !!link?.custom_external_link;

const height = {
Expand All @@ -107,12 +107,12 @@ const Item = ({ subLabel, link, avatar, ...rest }: ItemProps) => {
alignItems="center"
px="24px"
py={{ base: "24px", md: "0px" }}
borderTopWidth={isSeperated ? "1px" : "0px"}
borderTopWidth={isSeparated ? "1px" : "0px"}
borderBottomWidth="1px!important"
borderColor="card-br!important"
backgroundColor="card-bg"
_hover={{ textDecoration: "none" }}
_last={{ borderBottomWidth: isSeperated ? "1px" : "0px" }}
_last={{ borderBottomWidth: isSeparated ? "1px" : "0px" }}
>
<Flex
direction={{ base: "column", md: "row" }}
Expand Down
16 changes: 8 additions & 8 deletions workspaces/website/src/pages/(components)/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import * as NavAccordian from "@ui/Layout/Navbar/NavAccordion";
import * as NavAccordion from "@ui/Layout/Navbar/NavAccordion";
import type { MainMenu } from "@starknet-io/cms-data/src/settings/main-menu";
import { NavBar } from "@ui/Layout/Navbar/Navbar";
import { MenuItemWithDropdown } from "@ui/Layout/Navbar/MenuItemWithDropdown";
Expand Down Expand Up @@ -134,12 +134,12 @@ export default function Navbar({
)
)}
mobileNavItems={
<NavAccordian.Root>
<NavAccordion.Root>
{mainMenu?.items?.map((mainMenuItem, mainMenuItemIndex) => {
return (
<NavAccordian.Item key={mainMenuItemIndex}>
<NavAccordian.Button title={mainMenuItem.title} />
<NavAccordian.Panel>
<NavAccordion.Item key={mainMenuItemIndex}>
<NavAccordion.Button title={mainMenuItem.title} />
<NavAccordion.Panel>
{mainMenuItem.columns?.length &&
mainMenuItem.columns?.map((column, columnIndex) => (
<Box key={columnIndex}>
Expand Down Expand Up @@ -180,11 +180,11 @@ export default function Navbar({
))}
</Box>
))}
</NavAccordian.Panel>
</NavAccordian.Item>
</NavAccordion.Panel>
</NavAccordion.Item>
);
})}
</NavAccordian.Root>
</NavAccordion.Root>
}
/>
</NavbarContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface Props {
readonly roadmapVersions: readonly RoadmapVersion[]
}

export default function LivePreivewPage({
export default function LivePreviewPage({
topics,
categories,
roadmapVersions
Expand Down
20 changes: 10 additions & 10 deletions workspaces/website/src/style/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export const tokens = {
"navbar-link-visited-fg": "#2166EF",
"nav-dialog-bg": "#FBFBFB",
"nav-header-bg": "#ffffff",
"nav-accordian-expanded-bg": "#0C0C4F",
"nav-accordian-expanded-fg": "#FFFFFF",
"nav-accordion-expanded-bg": "#0C0C4F",
"nav-accordion-expanded-fg": "#FFFFFF",
"nav-footer-br": "#EFEFEF",
"nav-searchinput-bg": "#F6F6F6",
"nav-searchinput-fg": "#858585",
Expand Down Expand Up @@ -280,8 +280,8 @@ export const tokens = {
"navbar-link-visited-fg": "#2166EF",
"nav-dialog-bg": "#1B1B1B",
"nav-header-bg": "#000000",
"nav-accordian-expanded-bg": "#AFCAFF",
"nav-accordian-expanded-fg": "#121212",
"nav-accordion-expanded-bg": "#AFCAFF",
"nav-accordion-expanded-fg": "#121212",
"nav-footer-br": "#313131",
"nav-searchinput-bg": "#1B1B1B",
"nav-searchinput-fg": "#AFCAFF",
Expand Down Expand Up @@ -658,13 +658,13 @@ export const semanticTokens = {
default: tokens.colors.light["nav-header-bg"],
_dark: tokens.colors.dark["nav-header-bg"],
},
"nav-accordian-expanded-bg": {
default: tokens.colors.light["nav-accordian-expanded-bg"],
_dark: tokens.colors.dark["nav-accordian-expanded-bg"],
"nav-accordion-expanded-bg": {
default: tokens.colors.light["nav-accordion-expanded-bg"],
_dark: tokens.colors.dark["nav-accordion-expanded-bg"],
},
"nav-accordian-expanded-fg": {
default: tokens.colors.light["nav-accordian-expanded-fg"],
_dark: tokens.colors.dark["nav-accordian-expanded-fg"],
"nav-accordion-expanded-fg": {
default: tokens.colors.light["nav-accordion-expanded-fg"],
_dark: tokens.colors.dark["nav-accordion-expanded-fg"],
},
"nav-footer-br": {
default: tokens.colors.light["nav-footer-br"],
Expand Down