View | Details | Raw Unified | Return to bug 36374
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js (+1 lines)
Lines 1-3 Link Here
1
/* keep tidy */
1
$(document).ready(function() {
2
$(document).ready(function() {
2
3
3
    // Pre-populate empty message with template
4
    // Pre-populate empty message with template
(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js (+1 lines)
Lines 1-3 Link Here
1
/* keep tidy */
1
$(document).ready(function() {
2
$(document).ready(function() {
2
    $('#ticketDetailsModal').on('show.bs.modal', function(event) {
3
    $('#ticketDetailsModal').on('show.bs.modal', function(event) {
3
        let modal = $(this);
4
        let modal = $(this);
(-)a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js (+1 lines)
Lines 1-3 Link Here
1
/* keep tidy */
1
let dataFetched = false;
2
let dataFetched = false;
2
let bookable_items,
3
let bookable_items,
3
    bookings,
4
    bookings,
(-)a/xt/js_tidy.t (-6 / +6 lines)
Lines 1-4 Link Here
1
#!/usr/bin/perl
1
#/usr/bin/perl
2
2
3
# This file is part of Koha.
3
# This file is part of Koha.
4
#
4
#
Lines 22-38 use FindBin(); Link Here
22
use Data::Dumper qw( Dumper );
22
use Data::Dumper qw( Dumper );
23
use Test::More tests => 1;
23
use Test::More tests => 1;
24
24
25
my @js_files;
25
my $cmd      = q{git grep -l '/\* keep tidy \*/'  -- '*.js'};
26
push @js_files, `git ls-files 'koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js'`;
26
my @js_files = qx{$cmd};
27
27
28
my @not_tidy;
28
my @not_tidy;
29
foreach my $filepath (@js_files) {
29
foreach my $filepath (@js_files) {
30
    chomp $filepath;
30
    chomp $filepath;
31
    my $tidy = qx{yarn --silent run prettier --trailing-comma es5 --arrow-parens avoid $filepath};
31
    my $tidy    = qx{yarn --silent run prettier --trailing-comma es5 --arrow-parens avoid $filepath};
32
    my $content = read_file $filepath;
32
    my $content = read_file $filepath;
33
    if ( $content ne $tidy ) {
33
    if ( $content ne $tidy ) {
34
        push @not_tidy, $filepath;
34
        push @not_tidy, $filepath;
35
    }
35
    }
36
}
36
}
37
37
38
is(scalar(@not_tidy), 0, 'No .js file should be messy') or diag Dumper \@not_tidy;
38
is( scalar(@not_tidy), 0, sprintf( 'No .js file should be messy %s/%s', scalar(@not_tidy), scalar(@js_files) ) )
39
    or diag Dumper \@not_tidy;
39
- 

Return to bug 36374