fix(lefthook): fix lefthook glob issues

This commit is contained in:
taroj1205 2025-06-03 16:13:47 +12:00
parent ad471b8d00
commit b2bc846b77
No known key found for this signature in database
GPG key ID: 0FCB6CFFE0981AB7
6 changed files with 39 additions and 45 deletions

View file

@ -14,7 +14,9 @@ export const cspellConfig: Linter.Config = {
'warn', 'warn',
{ {
configFile: new URL('../cspell.json', import.meta.url).toString(), configFile: new URL('../cspell.json', import.meta.url).toString(),
cspell: {}, cspell: {
language: 'en,es',
},
}, },
], ],
}, },

View file

@ -1,6 +1,6 @@
{ {
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", "$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}"], "files": ["**/*.{ts,js,astro,html,css,json,yml,yaml,md}"],
"words": [ "words": [
"createdDefault", "createdDefault",
@ -50,7 +50,19 @@
"Briel", "Briel",
"Otero", "Otero",
"Pdzly", "Pdzly",
"ferrocyante" "ferrocyante",
"testid",
"linuxsum",
"linuxarmsum",
"bryan",
"oscar",
"daniel",
"Kristijan",
"adam",
"mozilla",
"patreon",
"theming",
"linaarchsum"
], ],
"flagWords": [], "flagWords": [],
"ignorePaths": [ "ignorePaths": [
@ -69,13 +81,14 @@
"pnpm-lock.yaml" "pnpm-lock.yaml"
], ],
"allowCompoundWords": true, "allowCompoundWords": true,
"dictionaries": ["typescript", "node", "html", "css", "bash", "npm"], "dictionaries": ["typescript", "node", "html", "css", "bash", "npm", "es-es"],
"import": [ "import": [
"@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-typescript/cspell-ext.json",
"@cspell/dict-node/cspell-ext.json", "@cspell/dict-node/cspell-ext.json",
"@cspell/dict-html/cspell-ext.json", "@cspell/dict-html/cspell-ext.json",
"@cspell/dict-css/cspell-ext.json", "@cspell/dict-css/cspell-ext.json",
"@cspell/dict-bash/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"
] ]
} }

View file

@ -3,9 +3,9 @@ pre-commit:
commands: commands:
prettier: prettier:
priority: 1 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: | run: |
pnpm prettier {staged_files} --write pnpm prettier {staged_files} --write --list-different
stage_fixed: true stage_fixed: true
eslint: eslint:
@ -19,10 +19,9 @@ pre-commit:
pnpm lefthook run cspell pnpm lefthook run cspell
eslint: eslint:
parallel: true
commands: commands:
base: 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: exclude:
- public/** - public/**
- dist/** - dist/**
@ -32,39 +31,10 @@ eslint:
pnpm eslint {staged_files} --max-warnings=0 --fix --cache pnpm eslint {staged_files} --max-warnings=0 --fix --cache
stage_fixed: true 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: cspell:
parallel: true
commands: commands:
base: 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
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}"
run: | run: |
pnpm cspell {staged_files} pnpm cspell {staged_files}
stage_fixed: true stage_fixed: true

View file

@ -59,6 +59,7 @@
"@commitlint/config-conventional": "^19.8.1", "@commitlint/config-conventional": "^19.8.1",
"@cspell/dict-bash": "^4.2.0", "@cspell/dict-bash": "^4.2.0",
"@cspell/dict-css": "^4.0.17", "@cspell/dict-css": "^4.0.17",
"@cspell/dict-es-es": "^3.0.3",
"@cspell/dict-html": "^4.0.11", "@cspell/dict-html": "^4.0.11",
"@cspell/dict-node": "^5.0.7", "@cspell/dict-node": "^5.0.7",
"@cspell/dict-npm": "^5.2.4", "@cspell/dict-npm": "^5.2.4",

8
pnpm-lock.yaml generated
View file

@ -105,6 +105,9 @@ importers:
'@cspell/dict-css': '@cspell/dict-css':
specifier: ^4.0.17 specifier: ^4.0.17
version: 4.0.17 version: 4.0.17
'@cspell/dict-es-es':
specifier: ^3.0.3
version: 3.0.3
'@cspell/dict-html': '@cspell/dict-html':
specifier: ^4.0.11 specifier: ^4.0.11
version: 4.0.11 version: 4.0.11
@ -579,6 +582,9 @@ packages:
'@cspell/dict-en_us@4.4.9': '@cspell/dict-en_us@4.4.9':
resolution: {integrity: sha512-5gjqpUwhE+qP9A9wxD1+MGGJ3DNqTgSpiOsS10cGJfV4p/Z194XkDUZrUrJsnJA/3fsCZHAzcNWh8m0bw1v++A==} 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': '@cspell/dict-filetypes@3.0.12':
resolution: {integrity: sha512-+ds5wgNdlUxuJvhg8A1TjuSpalDFGCh7SkANCWvIplg6QZPXL4j83lqxP7PgjHpx7PsBUS7vw0aiHPjZy9BItw==} resolution: {integrity: sha512-+ds5wgNdlUxuJvhg8A1TjuSpalDFGCh7SkANCWvIplg6QZPXL4j83lqxP7PgjHpx7PsBUS7vw0aiHPjZy9BItw==}
@ -5633,6 +5639,8 @@ snapshots:
'@cspell/dict-en_us@4.4.9': {} '@cspell/dict-en_us@4.4.9': {}
'@cspell/dict-es-es@3.0.3': {}
'@cspell/dict-filetypes@3.0.12': {} '@cspell/dict-filetypes@3.0.12': {}
'@cspell/dict-flutter@1.1.0': {} '@cspell/dict-flutter@1.1.0': {}

View file

@ -1121,7 +1121,7 @@
"description": "Fixed handling of corrupted mod files" "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" "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 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" "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 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" "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 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" "description": "Fixed entering into customize mode while having collapsed tabs"
@ -1856,7 +1856,7 @@
"issue": 4050 "issue": 4050
}, },
{ {
"description": "Fixed weird colouring for toggle inputs", "description": "Fixed weird coloring for toggle inputs",
"issue": 4047 "issue": 4047
}, },
"Update application identifier for Zen Browser to align with new naming conventions (MacOS)", "Update application identifier for Zen Browser to align with new naming conventions (MacOS)",