Skip to content

Commit

Permalink
refactor: improve word splitting for project directory spell check, u…
Browse files Browse the repository at this point in the history
…sing internal formatter

Signed-off-by: Ben James <[email protected]>
  • Loading branch information
benjam-es committed Jan 18, 2025
1 parent eb44b31 commit 69a675b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Closure;
use Peck\Support\PresetProvider;
use Peck\Support\ProjectPath;
use Peck\Support\SpellcheckFormatter;

final class Config
{
Expand Down Expand Up @@ -178,6 +179,8 @@ private function persist(): void
*/
private function ignoreWordsFromProjectPath(): array
{
return explode(DIRECTORY_SEPARATOR, ProjectPath::get());
$directories = explode(DIRECTORY_SEPARATOR, ProjectPath::get());

return array_map(fn ($directory): string => SpellcheckFormatter::format($directory), array_filter($directories));
}
}

0 comments on commit 69a675b

Please sign in to comment.