diff --git a/web/cspell.json b/web/cspell.json index 7f0753d992..41fca75c3e 100644 --- a/web/cspell.json +++ b/web/cspell.json @@ -1,33 +1,65 @@ { "version": "0.2", "language": "en", - "allowCompoundWords": true, + "allowCompoundWords": false, "ignorePaths": [ "src/lib/cockpit.js", "src/lib/cockpit-po-plugin.js" ], - "ignoreWords": [ - "addrs", - "apsens", - "btrfs", - "ccmp", - "dbus", - "dinstaller", - "ibft", - "ifaces", - "ipaddr", - "iscsi", - "jdoe", - "lldp", - "luks", - "mgmt", - "partitioner", - "patternfly", - "rfkill", - "ssid", - "ssids", - "subvol", - "teleporter", - "tkip" + "import": [ + "@cspell/dict-css/cspell-ext.json", + "@cspell/dict-en-common-misspellings/cspell-ext.json", + "@cspell/dict-fullstack/cspell-ext.json", + "@cspell/dict-html/cspell-ext.json" + ], + "dictionaryDefinitions": [ + { + "name": "custom", + "words": [ + "addrs", + "apsens", + "autologin", + "autoconnect", + "btrfs", + "ccmp", + "dbus", + "dinstaller", + "filecontent", + "filename", + "fullname", + "freedesktop", + "ibft", + "ifaces", + "ipaddr", + "iscsi", + "jdoe", + "lldp", + "localdomain", + "luks", + "mgmt", + "partitioner", + "patternfly", + "rfkill", + "screenreader", + "ssid", + "ssids", + "subprogress", + "subvol", + "subvolume", + "subvolumes", + "teleporter", + "testfile", + "testsuite", + "textinput", + "tkip" + ] + } + ], + "dictionaries": [ + "custom", + "css", + "en-common-misspelling", + "fullstack", + "html" ] } diff --git a/web/package-lock.json b/web/package-lock.json index 030b87b53b..202b413ed3 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -24,6 +24,10 @@ "@babel/eslint-parser": "^7.13.14", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", + "@cspell/dict-css": "^4.0.5", + "@cspell/dict-en-common-misspellings": "^1.0.2", + "@cspell/dict-fullstack": "^3.1.4", + "@cspell/dict-html": "^4.0.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@svgr/webpack": "^6.5.1", "@testing-library/jest-dom": "^5.16.5", diff --git a/web/package.json b/web/package.json index 5e5c17607f..05deb1bec1 100644 --- a/web/package.json +++ b/web/package.json @@ -29,6 +29,10 @@ "@babel/eslint-parser": "^7.13.14", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", + "@cspell/dict-css": "^4.0.5", + "@cspell/dict-en-common-misspellings": "^1.0.2", + "@cspell/dict-fullstack": "^3.1.4", + "@cspell/dict-html": "^4.0.3", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@svgr/webpack": "^6.5.1", "@testing-library/jest-dom": "^5.16.5", diff --git a/web/src/assets/fonts.scss b/web/src/assets/fonts.scss index 48286afa8c..4d8c1d1641 100644 --- a/web/src/assets/fonts.scss +++ b/web/src/assets/fonts.scss @@ -9,6 +9,8 @@ * Note: At the time of writing, Google Fonts only use the older version (1.0) */ +// cspell:ignore optimizelegibility + /* LatoLatin-Regular */ @font-face { font-family: Lato; diff --git a/web/src/client/storage.test.js b/web/src/client/storage.test.js index 15b15dafd8..9c32743680 100644 --- a/web/src/client/storage.test.js +++ b/web/src/client/storage.test.js @@ -360,14 +360,14 @@ describe("#iscsi", () => { username: "test", password: "12345", reverseUsername: "target", - reversePassword: "notsecret" + reversePassword: "nonsecret" }); expect(cockpitProxies.iscsiInitiator.Discover).toHaveBeenCalledWith("192.168.100.101", 3260, { Username: { t: "s", v: "test" }, Password: { t: "s", v: "12345" }, ReverseUsername: { t: "s", v: "target" }, - ReversePassword: { t: "s", v: "notsecret" } + ReversePassword: { t: "s", v: "nonsecret" } }); }); }); @@ -403,7 +403,7 @@ describe("#iscsi", () => { username: "test", password: "12345", reverseUsername: "target", - reversePassword: "notsecret", + reversePassword: "nonsecret", startup: "automatic" }); @@ -411,7 +411,7 @@ describe("#iscsi", () => { Username: { t: "s", v: "test" }, Password: { t: "s", v: "12345" }, ReverseUsername: { t: "s", v: "target" }, - ReversePassword: { t: "s", v: "notsecret" }, + ReversePassword: { t: "s", v: "nonsecret" }, Startup: { t: "s", v: "automatic" } }); }); diff --git a/web/src/components/layout/Layout.jsx b/web/src/components/layout/Layout.jsx index 7bf60216fa..32b3306da7 100644 --- a/web/src/components/layout/Layout.jsx +++ b/web/src/components/layout/Layout.jsx @@ -175,7 +175,7 @@ const AdditionalInfo = FooterInfoArea.Source; const PageOptionsSlot = PageOptions.Target; /** - * Component for teleporting page related options to the PageOptions slot + * Component for teleport page related options to the PageOptions slot */ const PageOptionsContent = PageOptions.Source; diff --git a/web/src/components/questions/QuestionActions.test.jsx b/web/src/components/questions/QuestionActions.test.jsx index 16c3f80dba..c6b7475866 100644 --- a/web/src/components/questions/QuestionActions.test.jsx +++ b/web/src/components/questions/QuestionActions.test.jsx @@ -24,12 +24,12 @@ import { screen } from "@testing-library/react"; import { installerRender } from "~/test-utils"; import { QuestionActions } from "~/components/questions"; -let defaultOption = "handsdown"; +let defaultOption = "sure"; let question = { id: 1, text: "Should we use a component for rendering actions?", - options: ["no", "maybe", "handsdown"], + options: ["no", "maybe", "sure"], defaultOption }; @@ -51,7 +51,7 @@ describe("QuestionActions", () => { it("renders the default option as primary action", async () => { renderQuestionActions(); - const button = await screen.findByRole("button", { name: "Handsdown" }); + const button = await screen.findByRole("button", { name: "Sure" }); expect(button.classList.contains("pf-m-primary")).toBe(true); }); @@ -86,7 +86,7 @@ describe("QuestionActions", () => { let button = await screen.findByRole("button", { name: "Maybe" }); expect(button.classList.contains("pf-m-secondary")).toBe(true); - button = await screen.findByRole("button", { name: "Handsdown" }); + button = await screen.findByRole("button", { name: "Sure" }); expect(button.classList.contains("pf-m-secondary")).toBe(true); }); }); @@ -104,7 +104,7 @@ describe("QuestionActions", () => { it("calls the actionCallback when user clicks on action", async () => { const { user } = renderQuestionActions(); - const button = await screen.findByRole("button", { name: "Handsdown" }); + const button = await screen.findByRole("button", { name: "Sure" }); await user.click(button); expect(actionCallback).toHaveBeenCalled();