Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/translation-linter.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
| option when running the command.
|
*/
'baseline' => base_path('translations.unused.baseline.json'),
'baseline' => lang_path('.lint/unused.json'),

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/Collections/ResultObjectCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function reset(): void
$this->items = [];
}

public function toBaseLineJson(): string
public function toBaselineJson(): string
{
return $this
->groupBy('locale')
Expand Down
2 changes: 1 addition & 1 deletion src/Contracts/Collections/ResultObjectCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ResultObjectCollection extends Arrayable, Enumerable
{
public function reset(): void;

public function toBaseLineJson(): string;
public function toBaselineJson(): string;

public function toCommandTableOutputArray(FieldCollectionContract $fields): array;

Expand Down
9 changes: 5 additions & 4 deletions src/Writers/UnusedBaselineFileWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ public function __construct(

public function execute(ResultObjectCollection $results)
{
$this->filesystem->put(
$this->file,
$results->toBaseLineJson(),
);
$path = $this->filesystem->dirname($this->file);

$this->filesystem->ensureDirectoryExists($path);

$this->filesystem->put($this->file, $results->toBaselineJson());
}
}