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(ci): add pr spell check #99

Merged
merged 3 commits into from
Jul 9, 2024
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/pr-spelling.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pr-spell-check
on: [pull_request]

jobs:
run:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
with:
config: .github/workflows/typos-config.toml
2 changes: 2 additions & 0 deletions .github/workflows/typos-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
default.check-filename = true
default.extend-ignore-re = ["no-inferrable-types"]
4 changes: 2 additions & 2 deletions packages/react/src/util/check-url-and-load.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// to avoid append script repeatly
// to avoid append script repeatedly
function loadScript(url: string, className: string) {
if (!document || !url || typeof url !== 'string') return;

Expand All @@ -12,7 +12,7 @@ function loadScript(url: string, className: string) {
document.body.appendChild(svg);
}

// to avoid append link repeatly
// to avoid append link repeatedly
function loadLink(url: string, className: string) {
if (!document || !url || typeof url !== 'string') return;

Expand Down
4 changes: 2 additions & 2 deletions packages/vue-next/src/utils/check-url-and-load.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const isServer = typeof window === 'undefined';

// to avoid append script repeatly
// to avoid append script repeatedly
function checkScriptAndLoad(url: string, className: string) {
if (isServer) {
return;
Expand All @@ -17,7 +17,7 @@ function checkScriptAndLoad(url: string, className: string) {
document.body.appendChild(svg);
}

// to avoid append link repeatly
// to avoid append link repeatedly
function checkLinkAndLoad(url: string, className: string) {
if (isServer) {
return;
Expand Down