Skip to content

Commit 60dccd9

Browse files
chore(): add cspell and fix spelling errors in docs (#3069)
1 parent 2256722 commit 60dccd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2381
-385
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
run: npm ci --legacy-peer-deps
2626
- name: Lint
2727
run: npm run lint
28-
# Lint changes should be pushed
29-
# to the branch before the branch
30-
# is merge eligible.
28+
- name: Spell Check
29+
run: npm run spellcheck
30+
# Lint and spell check changes should be pushed
31+
# to the branch before the branch is merge eligible.
3132
- name: Check Diff
3233
run: git diff --exit-code
3334
shell: bash

CONTRIBUTING.md

Lines changed: 64 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Thanks for your interest in contributing to Ionic's documentation! :tada: Check
44

55
- [Contributing Guide](#contributing-guide)
66
- [Development Workflow](#development-workflow)
7+
- [Previewing Changes](#previewing-changes)
8+
- [Linting Documentation](#linting-documentation)
9+
- [Spell Check](#spell-check)
710
- [Using VS Code on Windows](#using-vs-code-on-windows)
811
- [Project Structure](#project-structure)
912
- [Directories](#directories)
@@ -12,22 +15,77 @@ Thanks for your interest in contributing to Ionic's documentation! :tada: Check
1215
- [Translation](#translation)
1316
- [Reporting Issues](#reporting-issues)
1417
- [Pull Request Guidelines](#pull-request-guidelines)
15-
<!-- - [Project Management](#project-management) -->
1618
- [Deploying](#deploying)
1719
- [License](#license)
1820

1921
---
2022

2123
## Development Workflow
2224

25+
### Previewing Changes
26+
2327
In order to run the documentation locally, install the dependencies and run the development server:
2428

2529
```sh
2630
$ npm install --legacy-peer-deps
2731
$ npm start
2832
```
2933

30-
> **Note**: certain versions of npm (5-8) and Node.js (10-16) are required to run certain scripts.
34+
> [!NOTE]
35+
> Certain versions of npm (5-8) and Node.js (10-16) are required to run certain scripts.
36+
37+
### Linting Documentation
38+
39+
This repository uses [Prettier](https://prettier.io/), an opinionated code formatter, in order to keep consistent formatting throughout the documentation. Run the following command to automatically fix all formatting, and then push any changes:
40+
41+
```
42+
npm run lint
43+
```
44+
45+
### Spell Check
46+
47+
This repository uses [cspell](https://cspell.org/), a spell checker for code, to automatically flag any spelling errors. Run the following command to see any spelling errors:
48+
49+
```
50+
npm run spellcheck
51+
```
52+
53+
> [!NOTE]
54+
> Any spelling errors will need to be fixed manually. There are various ways to ignore words or sections that were flagged erroneously. These are listed below.
55+
56+
#### Ignoring words
57+
58+
**To ignore:**
59+
60+
- A **specific word**, add it to the following file: `cspell-wordlist.txt`
61+
- For example, `Ionicons` is flagged as an unknown word. Since this is the name of our software, it has been added to this file to be ignored.
62+
- A **directory** or anything matching a **regular expression**, update the following file: `cspell.json`
63+
- For example, we don't want to flag anything inside of code ticks (<code>`</code>) or code blocks (<code>```</code>), so there are regular expressions added to ignore anything inside of these.
64+
- An **entire line**, add the following comment above it:
65+
```markdown
66+
<!-- cspell:disable-next-line -->
67+
```
68+
- **Multiple lines**, add comments above and below the lines to be ignored:
69+
70+
```markdown
71+
<!-- cspell:disable -->
72+
73+
<p>Everything inside of these comments will be ignored by the spell checkr. Proofread your own words carefully.</p>
74+
75+
<!-- cspell:enable -->
76+
```
77+
78+
> [!IMPORTANT]
79+
> You need to have line breaks between the `cspell` comments and any HTML elements,
80+
> otherwise the build will error with `Module build failed`.
81+
82+
#### Tips
83+
84+
Before adding a word or section to be ignored, see if there is a way to make it pass the spell check. Technical terms that are part of an API may need to be wrapped in code formatting. For example, the word `keydown` is flagged as an unknown word by the spell checker, but this is a [Web API event](https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event). We can wrap any mentions of `keydown` in two backticks (<code>\`keydown\`</code>) in order to avoid it being flagged by the spell checker.
85+
86+
Comments disabling the next line or entire sections of documentation are useful for making the spell checker ignore people's names.
87+
88+
In general, we should try to avoid ignoring words unless they are technical terms that are used throughout the documentation and wouldn't necessarily make sense formatted as code.
3189

3290
---
3391

@@ -87,6 +145,8 @@ We use Crowdin for our translation service. You can participate in the translati
87145

88146
_Please submit translation issues to the Crowdin page and not the Ionic Docs GitHub repo._
89147

148+
<!-- cspell:disable-next-line -->
149+
90150
The Japanese translation of the docs were built by an independent team, lead by [rdlabo](https://github.com/rdlabo) and can be found and contributed to on the [ionic-jp group's `ionic-docs` project page](https://github.com/ionic-jp/ionic-docs).
91151

92152
## Reporting Issues
@@ -100,7 +160,8 @@ If the issue you're reporting is a bug, please be sure it is an issue with the I
100160
- OS and browser versions
101161
- If possible, a demo repo or CodePen/CodeSandbox
102162

103-
> **Note**: Some [reference content](#reference-content) is pulled from other Ionic repos. In that case, please submit your issue on the docs repo with a link to the repo where the content lives.
163+
> [!NOTE]
164+
> Some [reference content](#reference-content) is pulled from other Ionic repos. In that case, please submit your issue on the docs repo with a link to the repo where the content lives.
104165
105166
---
106167

@@ -110,20 +171,6 @@ When submitting pull requests, please keep the scope of your change contained to
110171

111172
---
112173

113-
<!-- ## Project Management
114-
115-
Internally, the Ionic documentation team uses a [project board](https://github.com/ionic-team/ionic-docs/projects/3) to plan work on the docs. The lanes on the board are:
116-
117-
- **Backlog** :file_cabinet: - Issues we plan to address, generally sorted by urgency
118-
- **On Deck** :baseball: - Issues to be addressed during the current sprint, pulled from backlog during sprint planning
119-
- **In Progress** :hammer: - Assigned issues that are currently being addressed
120-
- **Needs Review** :mag: - Pull requests and issues that have a pending review
121-
- **Done** :tada: - Issues that have been resolved
122-
123-
If you're looking for issues to help out with, we'd recommend either asking about an issue in the backlog or checking for issues labeled [`help-wanted`](https://github.com/ionic-team/ionic-docs/labels/help%20wanted).
124-
125-
--- -->
126-
127174
## Deploying
128175

129176
The Ionic documentation's `main` branch is deployed automatically and separately from the [Ionic site](https://github.com/ionic-team/ionic-site) itself. The Ionic site then uses a proxy for paths under `/docs` to request the deployed documentation.

cspell-wordlist.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
Appflow
2+
Codepen
3+
Firestore
4+
Genymotion
5+
Hygen
6+
Ionicon
7+
Ionicons
8+
Logcat
9+
Maskito
10+
Pluralsight
11+
Swiper
12+
Udemy
13+
Vetur
14+
Wistia
15+
16+
actionsheet
17+
fabs
18+
datetime
19+
datetimes
20+
datetimepicker
21+
infinitescroll
22+
searchbar
23+
searchbars
24+
sidemenu
25+
textarea
26+
textareas
27+
28+
appstore
29+
authed
30+
autogrow
31+
automations
32+
autoplay
33+
comparewith
34+
composables
35+
engageable
36+
flexbox
37+
frontmatter
38+
fullscreen
39+
geolocation
40+
interactives
41+
isopen
42+
jank
43+
janky
44+
jarsigner
45+
jsdelivr
46+
keyframes
47+
keytool
48+
lifecycles
49+
localstorage
50+
mobileweb
51+
phablet
52+
playstore
53+
preconfigured
54+
preflighted
55+
proxying
56+
quickstart
57+
retargeted
58+
runtimes
59+
scroller
60+
subcomponent
61+
subcomponents
62+
swipeable
63+
templating
64+
transpiling
65+
treeshaking
66+
triaging
67+
typeahead
68+
unminified
69+
unsanitized
70+
viewports
71+
webapps
72+
webviews
73+
xlarge
74+
xsmall
75+
76+
allowtransparency
77+
mozallowfullscreen
78+
msallowfullscreen
79+
oallowfullscreen
80+
webkitallowfullscreen

cspell.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"dictionaries": ["custom-words"],
3+
"dictionaryDefinitions": [
4+
{
5+
"name": "custom-words",
6+
"path": "./cspell-wordlist.txt",
7+
"addWords": true
8+
}
9+
],
10+
"ignoreRegExpList": [
11+
"/(```+)[\\s\\S]+?\\1/g",
12+
"`([^`]*)`",
13+
"/:[a-zA-Z0-9-_\\+]+:/g"
14+
],
15+
"ignorePaths": [
16+
"docs/cli",
17+
"docs/native",
18+
"versioned_docs/**/api",
19+
"versioned_docs/**/cli",
20+
"versioned_docs/**/native"
21+
],
22+
"flagWords": [
23+
"hte"
24+
]
25+
}

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The `/docs` folder houses all markdown files. The page structure loosely maps to
44

55
## Versioning
66

7-
This folder can also contain components, assets, and whatever else is meant to be versioned when the docusaurus versioning script is run. For example, if there is a page component that is only relevant to the `layout` section in the current version of Ionic, it could be added to a `_components/` folder in `docs/layout/`. When the versioning script is run, the component will be copied to `versioned_docs/verion-{X}/layout/_components/` and there will now be a separate component in `docs/layout/_components/` that can be deleted or updated to the latest version. The same concept applies to images and other files.
7+
This folder can also contain components, assets, and whatever else is meant to be versioned when the docusaurus versioning script is run. For example, if there is a page component that is only relevant to the `layout` section in the current version of Ionic, it could be added to a `_components/` folder in `docs/layout/`. When the versioning script is run, the component will be copied to `versioned_docs/version-{X}/layout/_components/` and there will now be a separate component in `docs/layout/_components/` that can be deleted or updated to the latest version. The same concept applies to images and other files.
88

99
If components are meant to be shared across versions, they can be put in `src/components/`. If images and other served files are meant to be shared across versions they can be put in `static/`.
1010

docs/angular/performance.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ For more information on how Angular manages change propagation with `ngFor` see
5656

5757
## From the Community
5858

59+
<!-- cspell:disable -->
60+
5961
[High Performance Animations in Ionic](https://www.joshmorony.com/high-performance-animations-in-ionic/) - Josh Morony
6062

6163
[High Performance List Filtering in Ionic](https://www.joshmorony.com/high-performance-list-filtering-in-ionic-2/) - Josh Morony
@@ -64,6 +66,8 @@ For more information on how Angular manages change propagation with `ngFor` see
6466

6567
[Ionic Framework is Fast (But Your Code Might Not Be)](https://www.joshmorony.com/ionic-framework-is-fast-but-your-code-might-not-be/) - Josh Morony
6668

69+
<!-- cspell:enable -->
70+
6771
:::note
6872
Do you have a guide you'd like to share? Click the _Edit this page_ button below.
6973
:::

docs/angular/slides.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -224,24 +224,24 @@ To migrate, we would change the name of the event to `slidechange`:
224224

225225
Below is a full list of event name changes when going from `ion-slides` to Swiper Angular:
226226

227-
| ion-slides Event | Swiper Event |
228-
| ----------------------- | -------------------------- |
229-
| ionSlideWillChange | slidechangetransitionstart |
230-
| ionSlideDidChange | slidechangetransitionend |
231-
| ionSlideDoubleTap | doubletap |
232-
| ionSlideDrag | slidermove |
233-
| ionSlideNextStart | slidenexttransitionstart |
234-
| ionSlideNextEnd | slidenexttransitionend |
235-
| ionSlidePrevStart | slideprevtransitionstart |
236-
| ionSlidePrevEnd | slideprevtransitionend |
237-
| ionSlideReachStart | reachbeginning |
238-
| ionSlideReachEnd | reachend |
239-
| ionSlideTap | tap |
240-
| ionSlideTouchStart | touchstart |
241-
| ionSlideTouchEnd | touchend |
242-
| ionSlideTransitionStart | transitionstart |
243-
| ionSlideTransitionEnd | transitionend |
244-
| ionSlidesDidLoad | init |
227+
| ion-slides Event | Swiper Event |
228+
| ------------------------- | ---------------------------- |
229+
| `ionSlideWillChange` | `slidechangetransitionstart` |
230+
| `ionSlideDidChange` | `slidechangetransitionend` |
231+
| `ionSlideDoubleTap` | `doubletap` |
232+
| `ionSlideDrag` | `slidermove` |
233+
| `ionSlideNextStart` | `slidenexttransitionstart` |
234+
| `ionSlideNextEnd` | `slidenexttransitionend` |
235+
| `ionSlidePrevStart` | `slideprevtransitionstart` |
236+
| `ionSlidePrevEnd` | `slideprevtransitionend` |
237+
| `ionSlideReachStart` | `reachbeginning` |
238+
| `ionSlideReachEnd` | `reachend` |
239+
| `ionSlideTap` | `tap` |
240+
| `ionSlideTouchStart` | `touchstart` |
241+
| `ionSlideTouchEnd` | `touchend` |
242+
| `ionSlideTransitionStart` | `transitionstart` |
243+
| `ionSlideTransitionEnd` | `transitionend` |
244+
| `ionSlidesDidLoad` | `init` |
245245

246246
:::note
247247
All events available in Swiper Element can be found at <a href="https://swiperjs.com/swiper-api#events" target="_blank" rel="noopener noreferrer">https://swiperjs.com/swiper-api#events</a>.
@@ -281,19 +281,19 @@ export class SlidesExample {
281281

282282
Below is a full list of method changes when going from `ion-slides` to Swiper Element:
283283

284-
| ion-slides Method | Notes |
285-
| ------------------ | ------------------------------------------------------------------------------------ |
286-
| getActiveIndex() | Use the `activeIndex` property instead. |
287-
| getPreviousIndex() | Use the `previousIndex` property instead. |
288-
| getSwiper() | Get a reference to the Swiper instance using the `swiper` prop. See example above. |
289-
| isBeginning() | Use the `isBeginning` property instead. |
290-
| isEnd() | Use the `isEnd` property instead. |
291-
| length() | Use the `slides` property instead. (i.e swiper.slides.length) |
292-
| lockSwipeToNext() | Use the `allowSlidesNext` property instead. |
293-
| lockSwipeToPrev() | Use the `allowSlidePrev` property instead. |
294-
| lockSwipes() | Use the `allowSlideNext`, `allowSlidePrev`, and `allowTouchMove` properties instead. |
295-
| startAutoplay() | Use the `autoplay` property instead. |
296-
| stopAutoplay() | Use the `autoplay` property instead. |
284+
| ion-slides Method | Notes |
285+
| -------------------- | ------------------------------------------------------------------------------------ |
286+
| `getActiveIndex()` | Use the `activeIndex` property instead. |
287+
| `getPreviousIndex()` | Use the `previousIndex` property instead. |
288+
| `getSwiper()` | Get a reference to the Swiper instance using the `swiper` prop. See example above. |
289+
| `isBeginning()` | Use the `isBeginning` property instead. |
290+
| `isEnd()` | Use the `isEnd` property instead. |
291+
| `length()` | Use the `slides` property instead. (i.e swiper.slides.length) |
292+
| `lockSwipeToNext()` | Use the `allowSlidesNext` property instead. |
293+
| `lockSwipeToPrev()` | Use the `allowSlidePrev` property instead. |
294+
| `lockSwipes()` | Use the `allowSlideNext`, `allowSlidePrev`, and `allowTouchMove` properties instead. |
295+
| `startAutoplay()` | Use the `autoplay` property instead. |
296+
| `stopAutoplay()` | Use the `autoplay` property instead. |
297297

298298
:::note
299299
All methods and properties available on the Swiper instance can be found at <a href="https://swiperjs.com/swiper-api#methods-and-properties" target="_blank" rel="noopener noreferrer">https://swiperjs.com/swiper-api#methods-and-properties</a>.

docs/angular/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ When an `@ionic/angular` application is generated, a default end-to-end test app
293293

294294
- `protractor.conf.js` - the Protractor configuration file
295295
- `tsconfig.e2e.json` - specific TypeScript configuration for the testing application
296-
- `src/app.po.ts` - a page object containing methods that navigate the application, query elements in the DOM, and maninpulate elements on the page
296+
- `src/app.po.ts` - a page object containing methods that navigate the application, query elements in the DOM, and manipulate elements on the page
297297
- `src/app.e2e-spec.ts` - a testing script
298298

299299
#### Page Objects

docs/angular/your-first-app/8-distribute.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For more on connecting your code repository to Appflow, checkout the [Connect yo
1818

1919
The Appflow SDK (also known as Ionic Deploy plugin) will allow you to take advantage of arguably two of the best Appflow features: deploying live updates to your app and bypassing the app stores. Ionic Appflow's Live Update feature is shipped with Appflow SDK and features the capabilities of detecting and syncing the updates for your app that you have pushed to your identified channels within the dashboard.
2020

21-
To get the Appflow SDK plugin added to your project, you can follow the install instructions within the Appflow Dashboard by clicking on "Install Instructions" inside of the `Deploy > Destinations` section. Alternatively, you can install the plugin manually by excuting the following command in your app's root directory:
21+
To get the Appflow SDK plugin added to your project, you can follow the install instructions within the Appflow Dashboard by clicking on "Install Instructions" inside of the `Deploy > Destinations` section. Alternatively, you can install the plugin manually by executing the following command in your app's root directory:
2222

2323
```shell
2424
ionic deploy add \
@@ -75,7 +75,7 @@ For more information, visit the [Create an Automation](https://ionic.io/docs/app
7575

7676
## Create an Environment
7777

78-
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be futher customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
78+
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be further customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
7979

8080
Creating an Environment is available for those on our [Basic plans](https://ionic.io/pricing) and above. More information on this can be found in the [Create an Environment](https://ionic.io/docs/appflow/quickstart/environment) section within the Appflow docs.
8181

0 commit comments

Comments
 (0)