Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Jun 1, 2023
1 parent c85c9fa commit ceb9603
Show file tree
Hide file tree
Showing 24 changed files with 18,650 additions and 51 deletions.
7 changes: 7 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"**/*.php": [
"./vendor/bin/ecs check --ansi --fix",
"./vendor/bin/phpstan analyse"
],
"*": "prettier --ignore-unknown --write"
}
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.md
*.php
composer.lock
src/templates/*
vendor/*
src/web/assets/**/dist
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"bracketSpacing": false,
"vueIndentScriptAndStyle": true
}
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
"bref/extra-php-extensions": "^1.2",
"league/flysystem-aws-s3-v3": "^3.15"
},
"require-dev": {
"craftcms/ecs": "dev-main",
"craftcms/phpstan": "dev-main"
},
"scripts": {
"check-cs": "ecs check --ansi",
"fix-cs": "ecs check --ansi --fix",
"phpstan": "phpstan --memory-limit=1G"
},
"autoload": {
"psr-4": {
"craft\\cloud\\": "src/"
Expand Down
186 changes: 183 additions & 3 deletions composer.lock

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

14 changes: 14 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

use craft\ecs\SetList;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return static function(ECSConfig $ecsConfig): void {
$ecsConfig->paths([
__DIR__ . '/src',
__FILE__,
]);

$ecsConfig->parallel();
$ecsConfig->sets([SetList::CRAFT_CMS_4]);
};
Loading

0 comments on commit ceb9603

Please sign in to comment.