-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/GPHWPP-3655_dashboard-nba
- Loading branch information
Showing
43 changed files
with
3,742 additions
and
2,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# script implements the prepush hook for automatically run lint on "git push" | ||
# | ||
# this feature is a opt-in - it will only be executed if the LINT_ON_PUSH is set to true in the .env file | ||
# | ||
# this script is executed by the pre-push hook in .git/hooks and will automatically lint everything before pushing | ||
# in case anything could not be fixed, the push will be aborted | ||
# | ||
# If you want to disable git hooks for some reason you can disable the git hooks by adding `--no-verify` to the git command. | ||
# Example : `git push --no-verify` | ||
# | ||
|
||
# bootstrap the environment | ||
source "./scripts/includes/bootstrap.sh" | ||
|
||
if [[ "$LINT_ON_PUSH" == 'true' ]]; then | ||
pnpm lint | ||
# pnpm lint-fix && git add -u $(git diff --cached --name-only --diff-filter=ACMRT) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer; | ||
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer; | ||
|
||
$codeSnifferConfig = new PHP_CodeSniffer\Config(["--standard=./packages/docker/ecs-php/ruleset.xml"]); | ||
PHP_CodeSniffer\Autoload::addSearchPath('/composer/vendor/wp-coding-standards/wpcs/WordPress', "WordPressCS\WordPress"); | ||
PHP_CodeSniffer\Autoload::addSearchPath('/composer/vendor/wp-coding-standards/wpcs/WordPress-Extra', "WordPressCS\WordPress-Extra"); | ||
PHP_CodeSniffer\Autoload::addSearchPath('/composer/vendor/wp-coding-standards/wpcs/WordPress-Core', "WordPressCS\WordPress-Core"); | ||
|
||
$configure = ECSConfig::configure(); | ||
|
||
$codeSnifferRuleset = new PHP_CodeSniffer\Ruleset($codeSnifferConfig); | ||
|
||
return $configure->withRules([ | ||
// import the rules from our loaded codesniffer config | ||
...array_values($codeSnifferRuleset->sniffCodes), | ||
]) | ||
->withPaths(['.']) | ||
->withRootFiles() | ||
->withSkip( | ||
[ | ||
'*/vendor/*', | ||
'*/build/*', | ||
'*/dist/*', | ||
'*/node_modules/*', | ||
'*/languages/*', | ||
'/phpunit/*', | ||
'*/wp-env-home/*', | ||
'*/.git/*', | ||
'/tmp/*', | ||
'**/ecs-config.php', | ||
'rector-config-php7.4.php', | ||
] | ||
) | ||
->withPreparedSets( | ||
symplify: true, | ||
psr12: true, | ||
// arrays: true, | ||
common: true, // (arrays | spaces | namespaces | docblocks | controlStructures | phpunit | comments) | ||
cleanCode: true, | ||
// comments: true, | ||
// docblocks: true, | ||
// spaces: true, | ||
// namespaces : true, | ||
// controlStructures: true, | ||
// phpunit : true | ||
// strict: true, | ||
// docblocks: true, | ||
) | ||
// use editor config if available | ||
// ->withEditorConfig(true) | ||
// use 2 spaces instead of psr12 default (4 spaces) | ||
->withSpacing(indentation: ' ') | ||
|
||
->withConfiguredRule(YodaStyleFixer::class, [ | ||
'equal' => true, | ||
'identical' => true, | ||
'less_and_greater' => true, | ||
]) | ||
// align assoc arrays | ||
->withConfiguredRule(BinaryOperatorSpacesFixer::class, [ | ||
'default' => 'align', | ||
]) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.