Skip to content

Commit

Permalink
refactor: format blade files using prettier
Browse files Browse the repository at this point in the history
Formatted using `./node_modules/.bin/prettier -w *`.
  • Loading branch information
Roardom committed Dec 25, 2023
1 parent 93b2bfc commit 240285f
Show file tree
Hide file tree
Showing 318 changed files with 14,428 additions and 9,320 deletions.
9 changes: 9 additions & 0 deletions .blade.format.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"attributeJsOptions": {
"semi": true
},
"phpOptions": {
"singleQuote": true
},
"useLaravelPint": false
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*.blade.php]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ignore all files
/*

# except /resources/views/**/*.blade.php
!/resources/
/resources/*
!/resources/views/
/resources/views/**/*.*
!/resources/views/**/*.blade.php

# ignored
resources/views/emails
resources/views/rss/show.blade.php
resources/views/vendor
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"plugins": [
"prettier-plugin-blade"
],
"overrides": [
{
"files": [
"*.blade.php"
],
"options": {
"parser": "blade",
"printWidth": 100,
"semi": true,
"singleQuote": true
}
}
]
}
45 changes: 38 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
"vue": "^2.6.14",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14"
},
"devDependencies": {
"prettier-plugin-blade": "^2.0.0"
}
}
4 changes: 1 addition & 3 deletions resources/views/Staff/announce/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
{{ __('staff.staff-dashboard') }}
</a>
</li>
<li class="breadcrumb--active">
Announces
</li>
<li class="breadcrumb--active">Announces</li>
@endsection

@section('page', 'page__history--index')
Expand Down
10 changes: 8 additions & 2 deletions resources/views/Staff/apikey/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
@extends('layout.default')

@section('title')
<title>{{ __('common.user') }} {{ __('user.apikeys') }} - {{ __('staff.staff-dashboard') }} - {{ config('other.title') }}</title>
<title>
{{ __('common.user') }} {{ __('user.apikeys') }} - {{ __('staff.staff-dashboard') }} -
{{ config('other.title') }}
</title>
@endsection

@section('meta')
<meta name="description" content="{{ __('user.apikeys') }} - {{ __('staff.staff-dashboard') }}">
<meta
name="description"
content="{{ __('user.apikeys') }} - {{ __('staff.staff-dashboard') }}"
/>
@endsection

@section('breadcrumbs')
Expand Down
12 changes: 8 additions & 4 deletions resources/views/Staff/application/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection

@section('meta')
<meta name="description" content="Applications - {{ __('staff.staff-dashboard') }}">
<meta name="description" content="Applications - {{ __('staff.staff-dashboard') }}" />
@endsection

@section('breadcrumbs')
Expand Down Expand Up @@ -58,7 +58,7 @@
<td>
<time
datetime="{{ $application->created_at }}"
title={{ $application->created_at }}
title="{{ $application->created_at }}"
>
{{ $application->created_at->diffForHumans() }}
</time>
Expand All @@ -67,12 +67,15 @@
@switch($application->status)
@case(\App\Models\Application::PENDING)
<span class="application--pending">Pending</span>

@break
@case(\App\Models\Application::APPROVED)
<span class="application--approved">Approved</span>

@break
@case(\App\Models\Application::REJECTED)
<span class="application--rejected">Rejected</span>

@break
@default
<span class="application--unknown">Unknown</span>
Expand All @@ -90,7 +93,8 @@
<li class="data-table__action">
<a
class="form__button form__button--text"
href="{{ route('staff.applications.show', ['id' => $application->id]) }}">
href="{{ route('staff.applications.show', ['id' => $application->id]) }}"
>
{{ __('common.view') }}
</a>
</li>
Expand All @@ -100,7 +104,7 @@ class="form__button form__button--text"
@empty
<tr class="applications--empty">
<td colspan="10">
{{ __('common.no')}} {{__('staff.applications') }}
{{ __('common.no') }} {{ __('staff.applications') }}
</td>
</tr>
@endforelse
Expand Down
Loading

0 comments on commit 240285f

Please sign in to comment.