Open kyranb opened 3 years ago
Can you execute the command with the verbose flag, e.g. php artisan lint:blade -v
?
Seeing a similar problem, here's my output.
PS C:\path\to\project> php artisan lint:blade
Are you sure you want to lint all blade files in your application? (yes/no) [no]:
> yes
Linting all blade templates
Found 91 blade files.
🗣 Start linting ...
1/91 [>---------------------------] 1%(account\mfa.active) Unexpected error.
(account\mfa.inactive) Unexpected error.
(account\modals.email) Unexpected error.
(account\modals.name) Unexpected error.
(account\modals.password) Unexpected error.
(account\modals.timezone) Unexpected error.
10/91 [===>------------------------] 10%(auth\passwords.confirm) Unexpected error.
(auth\passwords.email) Unexpected error.
(auth\passwords.reset) Unexpected error.
16/91 [====>-----------------------] 17%(carriers\modals.credentials) Unexpected error.
(carriers\modals.delete) Unexpected error.
19/91 [=====>----------------------] 20%(carriers\modals.disable) Unexpected error.
(carriers\modals.edit) Unexpected error.
(carriers\modals.enable) Unexpected error.
(carriers\modals.verify) Unexpected error.
31/91 [=========>------------------] 34%(enterprise_hosts\modals.create) Unexpected error.
(enterprise_hosts\modals.credentials) Unexpected error.
(enterprise_hosts\modals.delete) Unexpected error.
(enterprise_hosts\modals.disable) Unexpected error.
(enterprise_hosts\modals.edit) Unexpected error.
(enterprise_hosts\modals.enable) Unexpected error.
(enterprise_hosts\modals.setup) Unexpected error.
49/91 [===============>------------] 53%(events\modals.details) Unexpected error.
58/91 [=================>----------] 63%(layouts\modals.tls-warning-modal) Unexpected error.
64/91 [===================>--------] 70%(messages\modals.details) Unexpected error.
(messages\modals.fail) Unexpected error.
(messages\modals.process) Unexpected error.
(numbers\modals.assign) Unexpected error.
(numbers\modals.delete) Unexpected error.
(numbers\modals.disable) Unexpected error.
(numbers\modals.enable) Unexpected error.
73/91 [======================>-----] 80%(numbers\modals.info) Unexpected error.
(numbers\modals.invalid) Unexpected error.
(numbers\modals.setup) Unexpected error.
(numbers\modals.use) Unexpected error.
82/91 [=========================>--] 90%(system\modals.create-user) Unexpected error.
(system\modals.delete-user) Unexpected error.
(system\modals.disable) Unexpected error.
(system\modals.edit-user) Unexpected error.
(system\modals.enable) Unexpected error.
91/91 [============================] 100%
✅ No errors, warnings or suggestions found.
Applied styles: WriteGood, Vale
🏁 Finished linting in 20.88 seconds.
If I run it manually specifying .
instead of \
(like below) it works fine:
php artisan lint:blade account.mfa.active
php artisan lint:blade account.mfa.inactive
php artisan lint:blade account.modals.email
php artisan lint:blade account.modals.name
php artisan lint:blade account.modals.password
php artisan lint:blade account.modals.timezone
php artisan lint:blade auth.passwords.confirm
php artisan lint:blade auth.passwords.email
php artisan lint:blade auth.passwords.reset
php artisan lint:blade carriers.modals.credentials
php artisan lint:blade carriers.modals.delete
php artisan lint:blade carriers.modals.disable
php artisan lint:blade carriers.modals.edit
php artisan lint:blade carriers.modals.enable
php artisan lint:blade carriers.modals.verify
php artisan lint:blade enterprise_hosts.modals.create
php artisan lint:blade enterprise_hosts.modals.credentials
php artisan lint:blade enterprise_hosts.modals.delete
php artisan lint:blade enterprise_hosts.modals.disable
php artisan lint:blade enterprise_hosts.modals.edit
php artisan lint:blade enterprise_hosts.modals.enable
php artisan lint:blade enterprise_hosts.modals.setup
php artisan lint:blade events.modals.details
php artisan lint:blade layouts.modals.tls-warning-modal
php artisan lint:blade messages.modals.details
php artisan lint:blade messages.modals.fail
php artisan lint:blade messages.modals.process
php artisan lint:blade numbers.modals.assign
php artisan lint:blade numbers.modals.delete
php artisan lint:blade numbers.modals.disable
php artisan lint:blade numbers.modals.enable
php artisan lint:blade numbers.modals.info
php artisan lint:blade numbers.modals.invalid
php artisan lint:blade numbers.modals.setup
php artisan lint:blade numbers.modals.use
php artisan lint:blade system.modals.create-user
php artisan lint:blade system.modals.delete-user
php artisan lint:blade system.modals.disable
php artisan lint:blade system.modals.edit-user
php artisan lint:blade system.modals.enable
Can you execute the command with the verbose flag, php artisan lint:blade -v?
PS C:\Users\dev\Projects\my-project> php artisan lint:blade -v
Are you sure you want to lint all blade files in your application? (yes/no) [no]:
> yes
Linting all blade templates
Found 92 blade files.
🗣 Start linting ...
1/92 [>---------------------------] 1% < 1 sec(account\mfa.active) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/account\mfa.active.blade.html): Failed to open stream: No such file or directory
(account\mfa.inactive) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/account\mfa.inactive.blade.html): Failed to open stream: No such file or directory
(account\modals.email) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/account\modals.email.blade.html): Failed to open stream: No such file or directory
(account\modals.name) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/account\modals.name.blade.html): Failed to open stream: No such file or directory
(account\modals.password) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/account\modals.password.blade.html): Failed to open stream: No such file or directory
(account\modals.timezone) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/account\modals.timezone.blade.html): Failed to open stream: No such file or directory
10/92 [===>------------------------] 10% 1 sec(auth\passwords.confirm) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/auth\passwords.confirm.blade.html): Failed to open stream: No such file or directory
(auth\passwords.email) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/auth\passwords.email.blade.html): Failed to open stream: No such file or directory
(auth\passwords.reset) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/auth\passwords.reset.blade.html): Failed to open stream: No such file or directory
16/92 [====>-----------------------] 17% 3 secs(carriers\modals.credentials) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/carriers\modals.credentials.blade.html): Failed to open stream: No such file or directory
(carriers\modals.delete) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/carriers\modals.delete.blade.html): Failed to open stream: No such file or directory
19/92 [=====>----------------------] 20% 3 secs(carriers\modals.disable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/carriers\modals.disable.blade.html): Failed to open stream: No such file or directory
(carriers\modals.edit) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/carriers\modals.edit.blade.html): Failed to open stream: No such file or directory
(carriers\modals.enable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/carriers\modals.enable.blade.html): Failed to open stream: No such file or directory
(carriers\modals.verify) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/carriers\modals.verify.blade.html): Failed to open stream: No such file or directory
31/92 [=========>------------------] 33% 6 secs(enterprise_hosts\modals.create) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.create.blade.html): Failed to open stream: No such file or directory
(enterprise_hosts\modals.credentials) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.credentials.blade.html): Failed to open stream: No such file or directory
(enterprise_hosts\modals.delete) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.delete.blade.html): Failed to open stream: No such file or directory
(enterprise_hosts\modals.disable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.disable.blade.html): Failed to open stream: No such file or directory
(enterprise_hosts\modals.edit) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.edit.blade.html): Failed to open stream: No such file or directory
37/92 [===========>----------------] 40% 7 secs(enterprise_hosts\modals.enable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.enable.blade.html): Failed to open stream: No such file or directory
(enterprise_hosts\modals.setup) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/enterprise_hosts\modals.setup.blade.html): Failed to open stream: No such file or directory
49/92 [==============>-------------] 53% 11 secs(events\modals.details) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/events\modals.details.blade.html): Failed to open stream: No such file or directory
59/92 [=================>----------] 64% 14 secs(layouts\modals.tls-warning-modal) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/layouts\modals.tls-warning-modal.blade.html): Failed to open stream: No such file or directory
65/92 [===================>--------] 70% 16 secs(messages\modals.details) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/messages\modals.details.blade.html): Failed to open stream: No such file or directory
(messages\modals.fail) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/messages\modals.fail.blade.html): Failed to open stream: No such file or directory
(messages\modals.process) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/messages\modals.process.blade.html): Failed to open stream: No such file or directory
(numbers\modals.assign) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.assign.blade.html): Failed to open stream: No such file or directory
(numbers\modals.delete) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.delete.blade.html): Failed to open stream: No such file or directory
(numbers\modals.disable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.disable.blade.html): Failed to open stream: No such file or directory
(numbers\modals.enable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.enable.blade.html): Failed to open stream: No such file or directory
74/92 [======================>-----] 80% 17 secs(numbers\modals.info) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.info.blade.html): Failed to open stream: No such file or directory
(numbers\modals.invalid) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.invalid.blade.html): Failed to open stream: No such file or directory
(numbers\modals.setup) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.setup.blade.html): Failed to open stream: No such file or directory
(numbers\modals.use) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/numbers\modals.use.blade.html): Failed to open stream: No such file or directory
83/92 [=========================>--] 90% 19 secs(system\modals.create-user) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/system\modals.create-user.blade.html): Failed to open stream: No such file or directory
(system\modals.delete-user) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/system\modals.delete-user.blade.html): Failed to open stream: No such file or directory
(system\modals.disable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/system\modals.disable.blade.html): Failed to open stream: No such file or directory
(system\modals.edit-user) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/system\modals.edit-user.blade.html): Failed to open stream: No such file or directory
(system\modals.enable) Unexpected error.
copy(C:\Users\dev\Projects\my-project\vendor\beyondcode\laravel-prose-linter\src\Linter/../../bin/vale-ai/tmp/system\modals.enable.blade.html): Failed to open stream: No such file or directory
92/92 [============================] 100% 21 secs
✅ No errors, warnings or suggestions found.
Applied styles: WriteGood, Vale
🏁 Finished linting in 21.32 seconds.
PS C:\Users\dev\Projects\my-project>
I also ran the (working) dot syntax on one of the failed files listed with the -v
flag but I don't see anything weird. It looks to me that it's possibly failing on second-level directories within the views
folder (i.e., views/folder/file.blade.php
works, but views/folder/subfolder/file.blade.php
won't.
php artisan lint:blade account.mfa.active -v
Linting single blade template with key 'account.mfa.active'.
🗣 Start linting ...
1/1 [============================] 100% 1 sec
✅ No errors, warnings or suggestions found.
Applied styles: WriteGood, Vale
🏁 Finished linting in 0.42 seconds.
"beyondcode/laravel-prose-linter": "^2.0",
Describe the bug When running
php artisan lint:blade
I see an "Unexpected error" next to each blade file.Executed command
php artisan lint:blade
CLI output
[a whole lot of views with the same error]
Invalid vale output. (teamwork.index) Unexpected error. Invalid vale output. (teamwork.emails.invite) Unexpected error. Invalid vale output. (teamwork.edit) Unexpected error. Invalid vale output. 367/367 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 1 sec(teamwork.create) Unexpected error. Invalid vale output.
✅ No errors, warnings or suggestions found. Applied styles: WriteGood, Vale 🏁 Finished linting in 1 seconds.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots and further data View are found a resources/views//.blade.php
System
Additional context The error doesn't arise when using lint:translation