justfile: standardise test recipes to lint-php/lint-css/lint-js/test + add fix recipe

- Removed ambiguous aliases: phpstan, cs-check (both pointed to lint-php which
  also ran php-cs-fixer, making the names misleading)
- Removed syntax (php -l) — redundant, phpstan already catches parse errors
- Split lint-biome into lint-css and lint-js with correct paths
- Added lint meta-recipe that runs all three linters
- Added fix recipe: biome check --write (CSS/JS format+lint) + php-cs-fixer fix (PHP)
- Updated build-lint to delegate to lint-css + lint-js
This commit is contained in:
Pontoporeia
2026-07-05 10:50:42 +02:00
parent 786eef6df5
commit 34b5d3e585
7 changed files with 48 additions and 28 deletions
+2 -2
View File
@@ -393,9 +393,9 @@ class ExportController
$t['license_name'] ?? '',
isset($t['jury_points']) ? (string) $t['jury_points'] : '',
$t['baiu_link'] ?? '',
!empty($t['cc2r']) ? 'Oui' : 'Non',
!empty($t['cc2r']) ? 'Oui' : 'Non',
!empty($t['exemplaire_baiu']) ? 'Oui' : 'Non',
!empty($t['exemplaire_erg']) ? 'Oui' : 'Non',
!empty($t['exemplaire_erg']) ? 'Oui' : 'Non',
];
}
+7 -2
View File
@@ -125,8 +125,13 @@ class SearchController
// HTMX partial: render just the results fragment and exit
if ($isHtmx) {
$this->renderSearchResultsFragment(compact(
'results', 'totalItems', 'totalPages', 'page',
'baseParams', 'coverMap', 'validationError',
'results',
'totalItems',
'totalPages',
'page',
'baseParams',
'coverMap',
'validationError',
));
}
+12 -4
View File
@@ -41,9 +41,15 @@ class FormBootstrap
public static function adminOld(array &$formData): callable
{
return function (string $key, string $default = '') use (&$formData): string|array {
if (!isset($formData[$key])) return $default;
if (is_array($formData[$key])) return $formData[$key];
if ($formData[$key] === null) return $default;
if (!isset($formData[$key])) {
return $default;
}
if (is_array($formData[$key])) {
return $formData[$key];
}
if ($formData[$key] === null) {
return $default;
}
return htmlspecialchars((string)$formData[$key]);
};
}
@@ -159,7 +165,9 @@ class FormBootstrap
'helpBlocks' => $helpBlocks,
'oldFn' => self::adminOld($formData),
'withAutofocusFn' => function (string $field, array $attrs = []) use ($autofocusField): array {
if ($autofocusField === $field) $attrs['autofocus'] = true;
if ($autofocusField === $field) {
$attrs['autofocus'] = true;
}
return $attrs;
},
+2 -1
View File
@@ -10,7 +10,8 @@
* Usage: <?= icon('trash') ?>
* <?= icon('search', 0, 'header-search-icon') ?>
*/
function icon(string $name, int $size = 0, string $class = ''): string {
function icon(string $name, int $size = 0, string $class = ''): string
{
$path = APP_ROOT . "/public/assets/icons/{$name}.svg";
if (!file_exists($path)) {
return "<!-- icon not found: {$name} -->";