Skip to content

Commit 8cf7bcc

Browse files
authored
Add cspell to CI (#203)
* Add cspell to CI * Run prettier
1 parent 2156c0c commit 8cf7bcc

File tree

8 files changed

+823
-76
lines changed

8 files changed

+823
-76
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: Prettier
3838
run: npm run prettier
3939

40+
- name: cspell
41+
run: npm run cspell
42+
4043
- name: Build app/common
4144
run: npm run build --prefix ./app/common
4245

.vscode/settings.json

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,4 @@
11
{
2-
"cSpell.words": [
3-
"appui",
4-
"autosizer",
5-
"baytown",
6-
"cooldown",
7-
"crossorigin",
8-
"ecsql",
9-
"exton",
10-
"fonttools",
11-
"frontstage",
12-
"frontstages",
13-
"ibim",
14-
"imodel",
15-
"imodelaccess",
16-
"imodeljs",
17-
"imodels",
18-
"itemprop",
19-
"itwin",
20-
"itwinjs",
21-
"itwins",
22-
"itwinui",
23-
"linkcode",
24-
"metrostation",
25-
"oidc",
26-
"rpcs",
27-
"ruleset",
28-
"rulesets",
29-
"sidenav",
30-
"signin",
31-
"signout",
32-
"tablist",
33-
"testid",
34-
"threagile",
35-
"twinjs",
36-
"typecheck",
37-
"unicodes",
38-
"unmangled",
39-
"unregisters",
40-
"unroute",
41-
"unstringified",
42-
"unsymlinking",
43-
"viewports",
44-
"vite",
45-
"widgetid"
46-
],
47-
"cSpell.ignoreWords": [
48-
"brotli",
49-
"fnames",
50-
"imjs",
51-
"lcov",
52-
"mmap",
53-
"pyftsubset",
54-
"pwdebug",
55-
"rralign",
56-
"wdth",
57-
"wght"
58-
],
59-
"cSpell.ignorePaths": ["package.json", ".vscode", "*.yaml", "*.yml"],
60-
"cSpell.ignoreRegExpList": ["from\\s\".*\";"],
61-
622
"editor.insertSpaces": true,
633
"editor.tabSize": 2,
644
"editor.trimAutoWhitespace": true,

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ To summarize, we only do string localization inside `ITwinJsApp/` subdirectory.
2828
We have two sets of tests:
2929

3030
- Unit tests for `presentation-rules-editor` package, which require 100% test coverage.
31-
3231
- To run these tests navigate to `presentation-rules-editor-react/` and execute:
3332

3433
```bash
3534
npm test
3635
```
3736

3837
- End-to-end tests for the editor application. These tests are split into `web` and `local` tests.
39-
4038
- To run `web` tests navigate to `app/e2e-tests/` and execute:
4139

4240
```bash

app/backend/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { Presentation, PresentationBackendLoggerCategory, PresentationBackendNat
1414
import { PresentationRulesEditorRpcImpl } from "./PresentationRulesEditorRpcImpl.js";
1515
import { initialize } from "./web/BackendServer.js";
1616

17+
// cspell:words Mmap
18+
1719
dotenv.config({ path: "../../.env" });
1820

1921
void (async () => {

app/frontend/src/app/experimental/StationPropertyValueRenderer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ function createStationValueReader(imodel: IModelConnection, elementId: Id64Strin
266266
}
267267
}
268268

269+
// cspell:disable
269270
const ecsql = `
270271
SELECT
271272
linearlyLocated.DistanceAlongFromStart DistanceAlong,
@@ -282,6 +283,7 @@ function createStationValueReader(imodel: IModelConnection, elementId: Id64Strin
282283
LIMIT
283284
1
284285
`;
286+
// cspell:enable
285287
const bindings = new QueryBinder().bindId("elementId", elementId);
286288
return imodel.createQueryReader(ecsql, bindings, { rowFormat: QueryRowFormat.UseECSqlPropertyIndexes });
287289
}

cspell.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"words": [
3+
"appui",
4+
"Autosizer",
5+
"baytown",
6+
"cooldown",
7+
"ecschema",
8+
"ecsql",
9+
"Exton",
10+
"frontstage",
11+
"frontstages",
12+
"ibim",
13+
"imodel",
14+
"imodeljs",
15+
"imodels",
16+
"itwin",
17+
"itwinjs",
18+
"itwins",
19+
"itwinui",
20+
"npmjs",
21+
"Metrostation",
22+
"rpcinterface",
23+
"threagile",
24+
"unstringified",
25+
"widgetid"
26+
],
27+
"ignorePaths": [
28+
"package.json",
29+
"dist",
30+
"scripts",
31+
"coverage",
32+
"**/*.test.ts",
33+
"**/*.test.tsx",
34+
"pnpm-lock.yaml",
35+
"**/*.d.ts",
36+
"**/*.config.*",
37+
"playwright-report"
38+
]
39+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"build:components": "npm run build --prefix ./presentation-rules-editor-react",
1010
"build:frontend": "npm run build --prefix ./app/frontend",
1111
"build:common": "npm run build --prefix ./app/common",
12+
"cspell": "cspell .",
1213
"start:frontend": "npm run start --prefix ./app/frontend -- --open",
1314
"link": "npm run link --prefix ./scripts --",
1415
"unlink": "npm run unlink --prefix ./scripts --",
@@ -42,9 +43,10 @@
4243
},
4344
"dependencies": {
4445
"cross-env": "^7.0.3",
46+
"cspell": "^9.2.0",
4547
"eslint-config-prettier": "^9.1.0",
4648
"npm-run-all": "^4.1.5",
47-
"prettier": "^3.4.2"
49+
"prettier": "^3.6.2"
4850
},
4951
"pnpm": {
5052
"overrides": {

0 commit comments

Comments
 (0)