From a1eb851cc3cd6919fe7a341210fefe185167bbe9 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Thu, 8 Feb 2024 16:54:23 -0800 Subject: [PATCH] Enable spell check for all files and fix (#2881) fix #2776 --- .../changes/fix-spellcheck-2024-1-8-23-16-15.md | 6 ++++++ .vscode/settings.json | 1 - cspell.yaml | 14 ++++++++++++++ package.json | 2 +- packages/http/lib/auth.tsp | 2 +- packages/samples/specs/binary/binary.tsp | 4 ++-- packages/samples/specs/documentation/docs.tsp | 2 +- .../samples/specs/encoded-names/encoded-names.tsp | 2 +- packages/samples/specs/string-template/main.tsp | 4 ++-- .../specs/testserver/body-complex/body-complex.tsp | 4 ++-- .../specs/testserver/body-string/body-string.tsp | 1 + .../output/binary/@typespec/openapi3/openapi.yaml | 4 ++-- .../documentation/@typespec/openapi3/openapi.yaml | 2 +- .../encoded-names/@typespec/openapi3/openapi.yaml | 2 +- .../body-complex/@typespec/openapi3/openapi.yaml | 4 ++-- packages/website/src/css/custom.css | 2 ++ 16 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 .chronus/changes/fix-spellcheck-2024-1-8-23-16-15.md diff --git a/.chronus/changes/fix-spellcheck-2024-1-8-23-16-15.md b/.chronus/changes/fix-spellcheck-2024-1-8-23-16-15.md new file mode 100644 index 000000000..94e12f5e9 --- /dev/null +++ b/.chronus/changes/fix-spellcheck-2024-1-8-23-16-15.md @@ -0,0 +1,6 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: internal +packages: + - "@typespec/http" +--- diff --git a/.vscode/settings.json b/.vscode/settings.json index c91ddc729..d1883400b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,7 +19,6 @@ "**/.git": true, "**/.DS_Store": true }, - "[javascript][javascriptreact][typescript][typescriptreact]": { "editor.formatOnSave": true, "editor.formatOnPaste": false, // work around https://github.com/simonhaenisch/prettier-plugin-organize-imports/issues/53 diff --git a/cspell.yaml b/cspell.yaml index 3797dc0bc..455b9b494 100644 --- a/cspell.yaml +++ b/cspell.yaml @@ -15,10 +15,12 @@ words: - cadl - cadleditor - cadleng + - cadlplayground - clsx - cobertura - codeql - Contoso + - CORGE - createsorreplacesresource - createsorupdatesresource - CRUDL @@ -29,13 +31,16 @@ words: - ecmarkup - esbuild - fluentui + - genproto - globby + - Infima - inmemory - instanceid - interner - intrinsics - jsyaml - keyer + - lifecyle - lzutf - mocharc - msbuild @@ -43,6 +48,7 @@ words: - multis - munge - mylib + - nanos - noformat - noopener - noreferrer @@ -75,9 +81,11 @@ words: - TRYIT - TSES - tspd + - tspwebsitepr - tsvs - typespecvs - Uhoh + - uitestresults - unassignable - Uncapitalize - uninstantiated @@ -101,6 +109,12 @@ ignorePaths: - "**/coverage/**" - packages/website/build/** - common/scripts/* + - "**/ThirdPartyNotices.txt" + - packages/compiler/test/formatter/scenarios/** + - pnpm-lock.yaml + - "**/*.mp4" + - packages/samples/test/output/** +useGitignore: true enableFiletypes: - cadl patterns: diff --git a/package.json b/package.json index 05155ae62..595c91198 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "check-version-mismatch": "syncpack list-mismatches", "change": "chronus", "clean": "pnpm -r run clean", - "cspell": "cspell --no-progress \"**/*.{md,ts,tsx}\" ", + "cspell": "cspell --no-progress .", "dogfood": "pnpm install && pnpm build && pnpm -r dogfood", "fix-version-mismatch": "syncpack fix-mismatches", "format": "pnpm run prettier --write", diff --git a/packages/http/lib/auth.tsp b/packages/http/lib/auth.tsp index 28a8942e9..465d8e699 100644 --- a/packages/http/lib/auth.tsp +++ b/packages/http/lib/auth.tsp @@ -120,7 +120,7 @@ enum OAuth2FlowType { @doc("authorization code flow") authorizationCode, - @doc("implcit flow") + @doc("implicit flow") implicit, @doc("password flow") diff --git a/packages/samples/specs/binary/binary.tsp b/packages/samples/specs/binary/binary.tsp index 21982d732..d2847301c 100644 --- a/packages/samples/specs/binary/binary.tsp +++ b/packages/samples/specs/binary/binary.tsp @@ -29,8 +29,8 @@ namespace BytesMethod { @route("binaryFile") @post op genericBinaryFile( - ...BytesBody<"application/octect-stream">, - ): BytesBody<"application/octect-stream">; + ...BytesBody<"application/octet-stream">, + ): BytesBody<"application/octet-stream">; @route("imagePng") @post diff --git a/packages/samples/specs/documentation/docs.tsp b/packages/samples/specs/documentation/docs.tsp index 5e9b53f4b..5162e4cf7 100644 --- a/packages/samples/specs/documentation/docs.tsp +++ b/packages/samples/specs/documentation/docs.tsp @@ -3,7 +3,7 @@ import "@typespec/rest"; using TypeSpec.Http; @service({ - title: "Documentaion sample", + title: "Documentation sample", }) namespace DocSample; diff --git a/packages/samples/specs/encoded-names/encoded-names.tsp b/packages/samples/specs/encoded-names/encoded-names.tsp index 7c704c85f..b09ff7dd1 100644 --- a/packages/samples/specs/encoded-names/encoded-names.tsp +++ b/packages/samples/specs/encoded-names/encoded-names.tsp @@ -1,5 +1,5 @@ /** - * This example showcase propviding a different name over the wire. + * This example showcase providing a different name over the wire. * In this example the `WithEncodedNames` model has a `notBefore` property that should get serialized as `nbf` when serialized as json. */ @service({ diff --git a/packages/samples/specs/string-template/main.tsp b/packages/samples/specs/string-template/main.tsp index 686031b28..330845b4f 100644 --- a/packages/samples/specs/string-template/main.tsp +++ b/packages/samples/specs/string-template/main.tsp @@ -1,4 +1,4 @@ -alias myconst = "foobar"; +alias myConst = "foobar"; model Person { simple: "Simple ${123} end"; @@ -8,7 +8,7 @@ model Person { ${true} line """; - ref: "Ref this alias ${myconst} end"; + ref: "Ref this alias ${myConst} end"; template: Template<"custom">; } diff --git a/packages/samples/specs/testserver/body-complex/body-complex.tsp b/packages/samples/specs/testserver/body-complex/body-complex.tsp index 2278afcf6..eeea36aeb 100644 --- a/packages/samples/specs/testserver/body-complex/body-complex.tsp +++ b/packages/samples/specs/testserver/body-complex/body-complex.tsp @@ -21,10 +21,10 @@ model Basic { @doc("Name property with a very long description that does not fit on a single line and a line break.") name: string; - color: CMYKColors; + color: Colors; } -enum CMYKColors { +enum Colors { cyan, Magenta, YELLOW, diff --git a/packages/samples/specs/testserver/body-string/body-string.tsp b/packages/samples/specs/testserver/body-string/body-string.tsp index 042639166..60558089b 100644 --- a/packages/samples/specs/testserver/body-string/body-string.tsp +++ b/packages/samples/specs/testserver/body-string/body-string.tsp @@ -1,5 +1,6 @@ import "@typespec/rest"; import "@typespec/openapi"; +/* cspell:disable */ using TypeSpec.Http; diff --git a/packages/samples/test/output/binary/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/binary/@typespec/openapi3/openapi.yaml index 966fdf264..ac927c67f 100644 --- a/packages/samples/test/output/binary/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/binary/@typespec/openapi3/openapi.yaml @@ -29,14 +29,14 @@ paths: '200': description: The request has succeeded. content: - application/octect-stream: + application/octet-stream: schema: type: string format: binary requestBody: required: true content: - application/octect-stream: + application/octet-stream: schema: type: string format: binary diff --git a/packages/samples/test/output/documentation/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/documentation/@typespec/openapi3/openapi.yaml index ac992d054..1b62c51d4 100644 --- a/packages/samples/test/output/documentation/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/documentation/@typespec/openapi3/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - title: Documentaion sample + title: Documentation sample version: 0000-00-00 tags: [] paths: diff --git a/packages/samples/test/output/encoded-names/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/encoded-names/@typespec/openapi3/openapi.yaml index ad906f39f..678fd4e1e 100644 --- a/packages/samples/test/output/encoded-names/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/encoded-names/@typespec/openapi3/openapi.yaml @@ -3,7 +3,7 @@ info: title: Sample showcasing encoded names version: 0000-00-00 description: |- - This example showcase propviding a different name over the wire. + This example showcase providing a different name over the wire. In this example the `WithEncodedNames` model has a `notBefore` property that should get serialized as `nbf` when serialized as json. tags: [] paths: diff --git a/packages/samples/test/output/testserver/body-complex/@typespec/openapi3/openapi.yaml b/packages/samples/test/output/testserver/body-complex/@typespec/openapi3/openapi.yaml index ee38c399e..15deb9e99 100644 --- a/packages/samples/test/output/testserver/body-complex/@typespec/openapi3/openapi.yaml +++ b/packages/samples/test/output/testserver/body-complex/@typespec/openapi3/openapi.yaml @@ -512,7 +512,7 @@ components: type: string description: Name property with a very long description that does not fit on a single line and a line break. color: - $ref: '#/components/schemas/CMYKColors' + $ref: '#/components/schemas/Colors' BooleanWrapper: type: object required: @@ -531,7 +531,7 @@ components: field: type: string format: byte - CMYKColors: + Colors: type: string enum: - cyan diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css index 5adc3120e..ea3679059 100644 --- a/packages/website/src/css/custom.css +++ b/packages/website/src/css/custom.css @@ -199,6 +199,7 @@ } .header-github-link:before { + /* cspell:disable-next-line */ background: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; content: ""; @@ -208,6 +209,7 @@ } [data-theme="dark"] .header-github-link:before { + /* cspell:disable-next-line */ background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; }