From b2bc846b77c279e8e3dd4b1f3930df8c747a91a4 Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Tue, 3 Jun 2025 16:13:47 +1200 Subject: [PATCH 1/3] fix(lefthook): fix lefthook glob issues --- .eslint/cspell.ts | 4 +++- cspell.json | 21 +++++++++++++++---- lefthook.yaml | 38 ++++------------------------------- package.json | 1 + pnpm-lock.yaml | 8 ++++++++ src/release-notes/stable.json | 12 +++++------ 6 files changed, 39 insertions(+), 45 deletions(-) diff --git a/.eslint/cspell.ts b/.eslint/cspell.ts index 094110a..b572ec8 100644 --- a/.eslint/cspell.ts +++ b/.eslint/cspell.ts @@ -14,7 +14,9 @@ export const cspellConfig: Linter.Config = { 'warn', { configFile: new URL('../cspell.json', import.meta.url).toString(), - cspell: {}, + cspell: { + language: 'en,es', + }, }, ], }, diff --git a/cspell.json b/cspell.json index e2ef9c7..2213aba 100644 --- a/cspell.json +++ b/cspell.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", - "language": "en", + "language": "en,es", "files": ["**/*.{ts,js,astro,html,css,json,yml,yaml,md}"], "words": [ "createdDefault", @@ -50,7 +50,19 @@ "Briel", "Otero", "Pdzly", - "ferrocyante" + "ferrocyante", + "testid", + "linuxsum", + "linuxarmsum", + "bryan", + "oscar", + "daniel", + "Kristijan", + "adam", + "mozilla", + "patreon", + "theming", + "linaarchsum" ], "flagWords": [], "ignorePaths": [ @@ -69,13 +81,14 @@ "pnpm-lock.yaml" ], "allowCompoundWords": true, - "dictionaries": ["typescript", "node", "html", "css", "bash", "npm"], + "dictionaries": ["typescript", "node", "html", "css", "bash", "npm", "es-es"], "import": [ "@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-html/cspell-ext.json", "@cspell/dict-css/cspell-ext.json", "@cspell/dict-bash/cspell-ext.json", - "@cspell/dict-npm/cspell-ext.json" + "@cspell/dict-npm/cspell-ext.json", + "@cspell/dict-es-es/cspell-ext.json" ] } diff --git a/lefthook.yaml b/lefthook.yaml index 92e523e..5c1aa95 100644 --- a/lefthook.yaml +++ b/lefthook.yaml @@ -3,9 +3,9 @@ pre-commit: commands: prettier: priority: 1 - glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,md,mdx,yaml,yml,json,html,css,astro}" + glob: "**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,md,mdx,yaml,yml,json,html,css,astro}" run: | - pnpm prettier {staged_files} --write + pnpm prettier {staged_files} --write --list-different stage_fixed: true eslint: @@ -19,10 +19,9 @@ pre-commit: pnpm lefthook run cspell eslint: - parallel: true commands: base: - glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro}" + glob: "**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro}" exclude: - public/** - dist/** @@ -32,39 +31,10 @@ eslint: pnpm eslint {staged_files} --max-warnings=0 --fix --cache stage_fixed: true - src: - root: src/ - glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro}" - run: | - pnpm eslint {staged_files} --max-warnings=0 --fix --cache - stage_fixed: true - - scripts: - root: scripts/ - glob: "*.{js,ts,py}" - run: | - pnpm eslint {staged_files} --max-warnings=0 --fix --cache - stage_fixed: true - cspell: - parallel: true commands: base: - glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro,json,yaml,yml,md,mdx}" - run: | - pnpm cspell {staged_files} - stage_fixed: true - - src: - root: src/ - glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro,json,yaml,yml,md,mdx}" - run: | - pnpm cspell {staged_files} - stage_fixed: true - - scripts: - root: scripts/ - glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,json,yaml,yml,md,mdx}" + glob: "**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro,json,yaml,yml,md,mdx}" run: | pnpm cspell {staged_files} stage_fixed: true diff --git a/package.json b/package.json index 2ad7313..7f43511 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@commitlint/config-conventional": "^19.8.1", "@cspell/dict-bash": "^4.2.0", "@cspell/dict-css": "^4.0.17", + "@cspell/dict-es-es": "^3.0.3", "@cspell/dict-html": "^4.0.11", "@cspell/dict-node": "^5.0.7", "@cspell/dict-npm": "^5.2.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 426ce18..4397a56 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -105,6 +105,9 @@ importers: '@cspell/dict-css': specifier: ^4.0.17 version: 4.0.17 + '@cspell/dict-es-es': + specifier: ^3.0.3 + version: 3.0.3 '@cspell/dict-html': specifier: ^4.0.11 version: 4.0.11 @@ -579,6 +582,9 @@ packages: '@cspell/dict-en_us@4.4.9': resolution: {integrity: sha512-5gjqpUwhE+qP9A9wxD1+MGGJ3DNqTgSpiOsS10cGJfV4p/Z194XkDUZrUrJsnJA/3fsCZHAzcNWh8m0bw1v++A==} + '@cspell/dict-es-es@3.0.3': + resolution: {integrity: sha512-hROLoJ/aBcK43drDqHVnZhtUS9cUQtTZFJl4k9ih3lBoeRhCZIQDg1qARfEFTEwX8LN+FrERjnahndrZcxuaGw==} + '@cspell/dict-filetypes@3.0.12': resolution: {integrity: sha512-+ds5wgNdlUxuJvhg8A1TjuSpalDFGCh7SkANCWvIplg6QZPXL4j83lqxP7PgjHpx7PsBUS7vw0aiHPjZy9BItw==} @@ -5633,6 +5639,8 @@ snapshots: '@cspell/dict-en_us@4.4.9': {} + '@cspell/dict-es-es@3.0.3': {} + '@cspell/dict-filetypes@3.0.12': {} '@cspell/dict-flutter@1.1.0': {} diff --git a/src/release-notes/stable.json b/src/release-notes/stable.json index ff5e4fc..ed05733 100644 --- a/src/release-notes/stable.json +++ b/src/release-notes/stable.json @@ -1067,7 +1067,7 @@ "Allow VAAPI/FMPEG APIs only for Linux", "Twilight will now display the proper name on .desktop files", "Added a better icon selection for workspaces, enhancing more icons", - "Created a \"Force container workspace\" option. Basically, force each container to belong to acertain workspace.", + "Created a \"Force container workspace\" option. Basically, force each container to belong to a certain workspace.", "Bookmarks are now opened in the workspace's default container", "Allow tab unloader to ignore picture-in-picture tabs" ], @@ -1121,7 +1121,7 @@ "description": "Fixed handling of corrupted mod files" }, { - "description": "Fixed reseting shortcuts not working" + "description": "Fixed resetting shortcuts not working" }, { "description": "Fixed settings UI when night theme is enabled while having a light website displayed" @@ -1430,7 +1430,7 @@ "description": "Fixed opening panel animation, making the popup view look weird while animating" }, { - "description": "Fixed web panels being reloaded when unpining them" + "description": "Fixed web panels being reloaded when unpinning them" }, { "description": "Fixed not making a default workspace when creating a new profile on specific conditions" @@ -1656,7 +1656,7 @@ "description": "Fixed an 'all-tabs' buttons appearing always and not being able to remove it" }, { - "description": "Fixed overlaping top toolbar in compact mode when having multiple toolbars enabled" + "description": "Fixed overlapping top toolbar in compact mode when having multiple toolbars enabled" }, { "description": "Fixed gradient generator overflowing the dialog on some displays" @@ -1684,7 +1684,7 @@ "description": "Fixed macos window control when changing right side tabs to normal tabs" }, { - "description": "Fixed compact mode overlaping site when having bookmarks bar enabled" + "description": "Fixed compact mode overlapping site when having bookmarks bar enabled" }, { "description": "Fixed entering into customize mode while having collapsed tabs" @@ -1856,7 +1856,7 @@ "issue": 4050 }, { - "description": "Fixed weird colouring for toggle inputs", + "description": "Fixed weird coloring for toggle inputs", "issue": 4047 }, "Update application identifier for Zen Browser to align with new naming conventions (MacOS)", From 8f8834c3822a340158f6362986465bda9f86beed Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Tue, 3 Jun 2025 16:20:27 +1200 Subject: [PATCH 2/3] chore(cspell): update cspell configuration and add new words for spell checking --- cspell.json | 98 +++++++++++++++++++++++++++------------------------- package.json | 2 +- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/cspell.json b/cspell.json index 2213aba..7bfdc2e 100644 --- a/cspell.json +++ b/cspell.json @@ -3,66 +3,68 @@ "language": "en,es", "files": ["**/*.{ts,js,astro,html,css,json,yml,yaml,md}"], "words": [ - "createdDefault", - "createdAsc", - "createdDesc", - "updatedDefault", - "updatedAsc", - "updatedDesc", + "adam", + "AMOLED", "Astronav", - "tuta", - "junicode", - "cfasync", - "Junicode", - "Galdámez", - "García", + "Briel", "brhm", "Brhm", - "kristijanribaric", - "Ribaric", - "larvey", - "Larvey", - "taroj", - "Jokagi", + "bryan", + "Canoa", + "canoa", + "cfasync", + "createdAsc", + "createdDefault", + "createdDesc", + "daniel", + "FMPEG", + "ferrocyante", + "flatpaks", + "Galdámez", + "García", + "Garro", + "isnan", + "itro", "jace", "Jace", - "canoa", - "Canoa", - "itro", "jafeth", "Jafeth", - "Garro", - "XPCOM", - "zsync", - "flatpaks", - "Nehalem", - "VAAPI", - "FMPEG", - "AMOLED", "jank", - "mfsa", - "OCSP", - "unfloatable", - "laggy", - "NSIS", - "wmfcdm", - "unfocusing", - "Briel", - "Otero", - "Pdzly", - "ferrocyante", - "testid", - "linuxsum", - "linuxarmsum", - "bryan", - "oscar", - "daniel", + "Jokagi", + "junicode", + "Junicode", + "kristijanribaric", "Kristijan", - "adam", + "laggy", + "larvey", + "Larvey", + "linuxarmsum", + "linuxsum", + "linaarchsum", + "mfsa", "mozilla", + "Nehalem", + "NSIS", + "OCSP", + "oscar", + "Otero", "patreon", + "Pdzly", + "Ribaric", + "taroj", + "testid", "theming", - "linaarchsum" + "tuta", + "tsconfigs", + "unfloatable", + "unfocusing", + "updatedAsc", + "updatedDefault", + "updatedDesc", + "VAAPI", + "wmfcdm", + "XPCOM", + "zsync" ], "flagWords": [], "ignorePaths": [ diff --git a/package.json b/package.json index 7f43511..950ecb9 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "astro": "astro", "lint": "eslint . --max-warnings=0 --cache", "lint:fix": "eslint . --fix", - "spell": "cspell \"src/**/*.{ts,tsx,js,jsx,astro,md,json,yml,yaml}\"", + "spell": "cspell \"**/*.{ts,tsx,js,jsx,astro,md,json,yml,yaml}\"", "format": "prettier . --check --cache", "format:fix": "prettier . --write --cache --list-different", "commitlint": "commitlint --edit", From 439b2faf7dbd769d00981b06c9c9856fc147ff76 Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Tue, 3 Jun 2025 16:21:10 +1200 Subject: [PATCH 3/3] chore(lefthook): improve glob for lefthook --- lefthook.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lefthook.yaml b/lefthook.yaml index 5c1aa95..5d0536e 100644 --- a/lefthook.yaml +++ b/lefthook.yaml @@ -3,7 +3,7 @@ pre-commit: commands: prettier: priority: 1 - glob: "**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,md,mdx,yaml,yml,json,html,css,astro}" + glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,md,mdx,yaml,yml,json,html,css,astro}" run: | pnpm prettier {staged_files} --write --list-different stage_fixed: true @@ -21,7 +21,7 @@ pre-commit: eslint: commands: base: - glob: "**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro}" + glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro}" exclude: - public/** - dist/** @@ -34,7 +34,7 @@ eslint: cspell: commands: base: - glob: "**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro,json,yaml,yml,md,mdx}" + glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,astro,json,yaml,yml,md,mdx}" run: | pnpm cspell {staged_files} stage_fixed: true