Skip to content

Commit cb9902b

Browse files
authored
Merge pull request #2 from laravel/actions-updates
Actions updates
2 parents f894fb0 + 6942886 commit cb9902b

31 files changed

+278
-337
lines changed

.github/workflows/lint.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: linter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
branches:
10+
- develop
11+
- main
12+
13+
jobs:
14+
quality:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: '8.2'
23+
24+
- name: Install Dependencies
25+
run: |
26+
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
27+
npm install
28+
29+
- name: Run Pint
30+
run: vendor/bin/pint
31+
32+
- name: Frontend Format Check
33+
run: npm run format
34+
35+
- name: Frontend Lint
36+
run: npm run lint
37+
38+
- name: Commit changes
39+
uses: stefanzweifel/git-auto-commit-action@v5
40+
with:
41+
commit_message: fix code style
42+
commit_options: '--no-verify'
43+
44+
# We need to run PHPStan after commiting changes as it does not auto-fix errors.
45+
- name: PHPStan
46+
run: ./vendor/bin/phpstan

.prettierignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Dependencies
2+
node_modules/
3+
vendor/
4+
5+
# Build outputs
6+
public/
7+
bootstrap/
8+
dist/
9+
.output/
10+
.nuxt/
11+
12+
# Generated files
13+
*.cache
14+
.env
15+
.env.*
16+
!.env.example
17+
18+
# Config files
19+
*.config.js
20+
*.config.ts
21+
22+
# ShadCN Vue components (as per project rules)
23+
resources/js/components/ui/
24+
25+
# IDE and Editor files
26+
.idea/
27+
.vscode/
28+
*.sublime-project
29+
*.sublime-workspace
30+
31+
# System files
32+
.DS_Store
33+
Thumbs.db
34+
35+
# Logs
36+
*.log
37+
npm-debug.log*
38+
yarn-debug.log*
39+
yarn-error.log*
40+
41+
# Test coverage
42+
coverage/

app/Http/Controllers/Auth/VerifyEmailController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public function __invoke(EmailVerificationRequest $request): RedirectResponse
1919
}
2020

2121
if ($request->user()->markEmailAsVerified()) {
22-
event(new Verified($request->user()));
22+
/** @var \Illuminate\Contracts\Auth\MustVerifyEmail $user */
23+
$user = $request->user();
24+
event(new Verified($user));
2325
}
2426

2527
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@
7575
},
7676
"minimum-stability": "dev",
7777
"prefer-stable": true
78-
}
78+
}

eslint.config.js

+11-60
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,19 @@
1-
import js from '@eslint/js';
21
import prettier from 'eslint-config-prettier';
3-
import globals from 'globals';
4-
import typescript from 'typescript-eslint';
52
import vue from 'eslint-plugin-vue';
63

7-
/** @type {import('eslint').Linter.Config[]} */
8-
export default [
9-
js.configs.recommended,
10-
...typescript.configs.recommended,
4+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
5+
6+
export default defineConfigWithVueTs(
7+
vue.configs['flat/essential'],
8+
vueTsConfigs.recommended,
119
{
12-
...vue.configs.flat.recommended,
13-
...vue.configs["flat/strongly-recommended"],
14-
...vue.configs["flat/essential"],
15-
languageOptions: {
16-
globals: {
17-
...globals.browser,
18-
},
19-
},
20-
rules: {
21-
"vue/match-component-import-name": "warn",
22-
"vue/match-component-file-name": [
23-
"error",
24-
{
25-
extensions: ["vue"],
26-
shouldMatchCase: true,
27-
},
28-
],
29-
"vue/component-definition-name-casing": ["error", "PascalCase"],
30-
"vue/block-tag-newline": [
31-
"warn",
32-
{
33-
singleline: "always",
34-
multiline: "always",
35-
maxEmptyLines: 0,
36-
},
37-
],
38-
"vue/html-self-closing": [
39-
"error",
40-
{
41-
html: {
42-
void: "always",
43-
normal: "never",
44-
component: "always",
45-
},
46-
svg: "always",
47-
math: "always",
48-
},
49-
],
50-
"vue/require-default-prop": "off",
51-
},
10+
ignores: ['vendor', 'node_modules', 'public', 'bootstrap/ssr', 'tailwind.config.js', 'resources/js/components/ui/*'],
5211
},
5312
{
54-
plugins: {
55-
"@typescript-eslint": tseslint.plugin,
56-
},
57-
languageOptions: {
58-
parser: tseslint.parser,
59-
parserOptions: {
60-
project: true,
61-
},
13+
rules: {
14+
'vue/multi-word-component-names': 'off',
15+
'@typescript-eslint/no-explicit-any': 'off',
6216
},
6317
},
64-
{
65-
ignores: ['vendor', 'node_modules', 'public', 'bootstrap/ssr', 'tailwind.config.js'],
66-
},
67-
prettier, // Turn off all rules that might conflict with Prettier
68-
];
18+
prettier,
19+
);

package-lock.json

+30-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
},
3535
"dependencies": {
3636
"@types/ziggy-js": "^1.3.3",
37+
"@vue/eslint-config-typescript": "^14.3.0",
3738
"@vueuse/core": "^12.0.0",
3839
"class-variance-authority": "^0.7.1",
3940
"clsx": "^2.1.1",

phpstan.neon

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
includes:
2+
- vendor/larastan/larastan/extension.neon
3+
4+
parameters:
5+
6+
paths:
7+
- app/
8+
9+
# Level 9 is the highest level
10+
level: 5

resources/css/app.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@
8383
body {
8484
@apply bg-background text-foreground;
8585
}
86-
}
86+
}

resources/js/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import '../css/app.css';
22

33
import { createInertiaApp } from '@inertiajs/vue3';
44
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
5-
import { createApp, h } from 'vue';
65
import type { DefineComponent } from 'vue';
6+
import { createApp, h } from 'vue';
77
import { ZiggyVue } from '../../vendor/tightenco/ziggy';
88
import { initializeTheme } from './composables/useAppearance';
99

0 commit comments

Comments
 (0)