Skip to content

Commit c60d51e

Browse files
authored
Merge pull request #151 from WordPress/feature/ghactions-add-spellcheck
GH Actions: add spellcheck + fix a few typos
2 parents 2b2f850 + d303210 commit c60d51e

File tree

5 files changed

+36
-4
lines changed

5 files changed

+36
-4
lines changed

.github/workflows/qa.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Basic QA checks
2+
3+
on:
4+
push:
5+
pull_request:
6+
# Allow manually triggering the workflow.
7+
workflow_dispatch:
8+
9+
# Cancels all previous workflow runs for the same branch that have not yet completed.
10+
concurrency:
11+
# The concurrency group contains the workflow name and the branch name.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
typos-spellcheck:
17+
name: "Find typos"
18+
19+
runs-on: "ubuntu-latest"
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v4"
24+
25+
- name: "Search for misspellings"
26+
uses: "crate-ci/typos@v1"

_typos.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[files]
2+
ignore-hidden = true
3+
4+
[default]
5+
locale = "en-us"
6+
check-filename = true

wordpress-coding-standards/css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Incorrect:
3636

3737
## Selectors
3838

39-
With specificity, comes great responsibility. Broad selectors allow us to be efficient, yet can have adverse consequences if not tested. Location-specific selectors can save us time, but will quickly lead to a cluttered stylesheet. Exercise your best judgement to create selectors that find the right balance between contributing to the overall style and layout of the DOM.
39+
With specificity, comes great responsibility. Broad selectors allow us to be efficient, yet can have adverse consequences if not tested. Location-specific selectors can save us time, but will quickly lead to a cluttered stylesheet. Exercise your best judgment to create selectors that find the right balance between contributing to the overall style and layout of the DOM.
4040

4141
- Similar to the [WordPress PHP Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions) for file names, use lowercase and separate words with hyphens when naming selectors. Avoid camelcase and underscores.
4242
- Use human readable selectors that describe what element(s) they style.

wordpress-coding-standards/javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ All [`@wordpress/element`](https://www.npmjs.com/package/@wordpress/element) Com
337337

338338
An exception to camel case is made for constant values which are never intended to be reassigned or mutated. Such variables must use the [SCREAMING_SNAKE_CASE convention](https://en.wikipedia.org/wiki/Snake_case#History).
339339

340-
In almost all cases, a constant should be defined in the top-most scope of a file. It is important to note that [JavaScript’s `const` assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) is conceptually more limited than what is implied here, where a value assigned by `const` in JavaScript can in-fact be mutated, and is only protected against reassignment. A constant as defined in these coding guidelines applies only to values which are expected to never change, and is a strategy for developers to communicate intent moreso than it is a technical restriction.
340+
In almost all cases, a constant should be defined in the top-most scope of a file. It is important to note that [JavaScript’s `const` assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) is conceptually more limited than what is implied here, where a value assigned by `const` in JavaScript can in-fact be mutated, and is only protected against reassignment. A constant as defined in these coding guidelines applies only to values which are expected to never change, and is a strategy for developers to communicate intent, more than it is a technical restriction.
341341

342342
## Comments
343343

wordpress-coding-standards/php.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ While this operator does exist in Core, it is often used lazily instead of doing
831831
832832
### Increment/decrement operators
833833

834-
Pre-increment/decrement should be favoured over post-increment/decrement for stand-alone statements.
834+
Pre-increment/decrement should be favored over post-increment/decrement for stand-alone statements.
835835

836836
Pre-increment/decrement will increment/decrement and then return, while post-increment/decrement will return and then increment/decrement.
837837
Using the "pre" version is slightly more performant and can prevent future bugs when code gets moved around.
@@ -934,7 +934,7 @@ if ( ! isset( $var ) ) {
934934
}
935935
```
936936

937-
Unless absolutely necessary, loose comparisons should not be used, as their behaviour can be misleading.
937+
Unless absolutely necessary, loose comparisons should not be used, as their behavior can be misleading.
938938

939939
Correct:
940940

0 commit comments

Comments
 (0)