matrix-art

An image gallery for Matrix
git clone git://archive.git.mtrnord.blog/MTRNord/matrix-art.git
Log | Files | Refs | README | LICENSE

commit bf7d648a43dbca9a681c2c1cba3fb68d762e6e7f
parent ad652b5eea3a6675d156ab6ccebf71f678d83034
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue, 25 Jan 2022 15:10:02 +0100

Fix typos and add typos CI

Diffstat:
A.github/workflows/spell-check.yml | 23+++++++++++++++++++++++
A_typos.toml | 15+++++++++++++++
Mcomponents/submit_page/main.tsx | 2+-
Mpages/api/posts/feed.rss.ts | 2+-
Mpages/index.tsx | 2+-
Mpages/post/[id].tsx | 2+-
6 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml @@ -0,0 +1,23 @@ +name: Spell Check +on: + push: + branches: + - "main" + pull_request: + +jobs: + run: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@14dc64f30986eaa2ad2dddcec073f5aab18e5a24 # v1 + with: + egress-policy: audit + - name: Checkout Actions Repository + uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 + + - name: Check spelling of proposals + uses: crate-ci/typos@4b2e66487c0d94e0f0ab1765a9e74bfed663aa1e # master + with: + config: ${{github.workspace}}/_typos.toml diff --git a/_typos.toml b/_typos.toml @@ -0,0 +1,14 @@ +[files] +extend-exclude = [ + "*.json", "*.svg", + "localstorage/**", + "node_modules/**", + "matrix-art-db/**", + ".next/**" +] + +[default] +locale = "en" + +[default.extend-words] +ND = "ND" +\ No newline at end of file diff --git a/components/submit_page/main.tsx b/components/submit_page/main.tsx @@ -143,7 +143,7 @@ class MainSubmissionForm extends PureComponent<Props, State> { <label className="inner-flex flex-col"> <span className="text-xl text-gray-900 dark:text-gray-200 font-bold">Image Tags</span> - <input name="tags" type="text" value={this.state[`${this.state.currentFileIndex}_tags`] || ""} placeholder="Enter tags (Seperate with a comma)" className="min-w-full placeholder:text-gray-900 text-gray-900" onChange={this.handleInputChange.bind(this)} /> + <input name="tags" type="text" value={this.state[`${this.state.currentFileIndex}_tags`] || ""} placeholder="Enter tags (Separate with a comma)" className="min-w-full placeholder:text-gray-900 text-gray-900" onChange={this.handleInputChange.bind(this)} /> </label> <span className="h-4"></span> diff --git a/pages/api/posts/feed.rss.ts b/pages/api/posts/feed.rss.ts @@ -56,7 +56,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) } } let image_events: MatrixImageEvents[] = []; - // TODO fix this somehow. It is super inefficent. + // TODO fix this somehow. It is super inefficient. for (let user of directory) { // We dont need many events const roomId = await client?.followUser(user.user_room); diff --git a/pages/index.tsx b/pages/index.tsx @@ -131,7 +131,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { } let image_events: MatrixImageEvents[] = []; - // TODO fix this somehow. It is super inefficent. + // TODO fix this somehow. It is super inefficient. for (let user of data) { // We dont need many events const roomId = await client?.followUser(user.user_room); diff --git a/pages/post/[id].tsx b/pages/post/[id].tsx @@ -81,7 +81,7 @@ class Post extends PureComponent<Props, State> { isLoadingImages: true, }); try { - // TODO fix this. It is super inefficent. + // TODO fix this. It is super inefficient. for (let user of this.props.directory_data) { // We dont need many events const roomId = await client?.followUser(user.user_room);