From cee6fbe2964c7f4dba18bed99d1e8ae44fc16bac Mon Sep 17 00:00:00 2001 From: nilsir Date: Fri, 6 Jan 2023 17:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85pint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 12 ++++++++- composer.lock | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++- pint.json | 13 +++++++++ 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 pint.json diff --git a/composer.json b/composer.json index 5250ae38..0bf07473 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,7 @@ "laravel-lang/attributes": "^1.0", "laravel-lang/lang": "^10.9", "laravel-lang/publisher": "^13.0", + "laravel/pint": "^1.3", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^6.1", @@ -69,6 +70,9 @@ ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" + ], + "pint": [ + "./vendor/bin/pint --config=pint.json" ] }, "extra": { @@ -82,5 +86,11 @@ "sort-packages": true }, "minimum-stability": "dev", - "prefer-stable": true + "prefer-stable": true, + "repositories": { + "packagist": { + "type": "composer", + "url": "https://mirrors.aliyun.com/composer/" + } + } } diff --git a/composer.lock b/composer.lock index 6590757c..52531a70 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bd6c477792b1e20d5eb819b7b07d41f1", + "content-hash": "c9a700b34c25dfc6bf63219f7a1695ac", "packages": [ { "name": "asm89/stack-cors", @@ -8302,6 +8302,78 @@ ], "time": "2022-06-17T21:15:34+00:00" }, + { + "name": "laravel/pint", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/pint.git", + "reference": "6a2c0927b4f6ad4eadb5a67fe3835fdad108949d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/pint/zipball/6a2c0927b4f6ad4eadb5a67fe3835fdad108949d", + "reference": "6a2c0927b4f6ad4eadb5a67fe3835fdad108949d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "ext-tokenizer": "*", + "ext-xml": "*", + "php": "^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~3.13.1", + "illuminate/view": "^9.32.0", + "laravel-zero/framework": "^9.2.0", + "mockery/mockery": "^1.5.1", + "nunomaduro/larastan": "^2.2.0", + "nunomaduro/termwind": "^1.14.0", + "pestphp/pest": "^1.22.1" + }, + "bin": [ + "builds/pint" + ], + "type": "project", + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Seeders\\": "database/seeders/", + "Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "An opinionated code formatter for PHP.", + "homepage": "https://laravel.com", + "keywords": [ + "format", + "formatter", + "lint", + "linter", + "php" + ], + "support": { + "issues": "https://github.com/laravel/pint/issues", + "source": "https://github.com/laravel/pint" + }, + "time": "2022-12-20T17:16:15+00:00" + }, { "name": "laravel/sail", "version": "v1.16.1", diff --git a/pint.json b/pint.json new file mode 100644 index 00000000..3f49c0c3 --- /dev/null +++ b/pint.json @@ -0,0 +1,13 @@ +{ + "preset": "laravel", + "rules": { + "braces": false + }, + "exclude": [ + "database", + "plugins" + ], + "notName": [ + "server.php" + ] +}