This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8e2164
commit 21f8977
Showing
156 changed files
with
27,691 additions
and
43,023 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:vue/vue3-recommended", | ||
"plugin:vue/vue3-essential", | ||
"plugin:vue/vue3-strongly-recommended" | ||
], | ||
rules: { | ||
"no-undef": 0, | ||
"vue/multi-word-component-names": 0, | ||
"vue/no-v-html": 0, | ||
"vue/require-default-prop": 0, | ||
"indent": ["error", 4], | ||
"quotes": ["error", "double"], | ||
} | ||
} |
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,82 @@ | ||
name: "Coding Standards" | ||
on: [push] | ||
jobs: | ||
coding-standards: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "8.0" | ||
node-version: | ||
- 16 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: "Install Node" | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "${{ matrix.node-version }}" | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: Cache node modules | ||
id: cache-npm | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }} | ||
name: List the state of node modules | ||
continue-on-error: true | ||
run: npm list | ||
|
||
- name: "Install locked dependencies with npm" | ||
run: "npm ci --ignore-scripts" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-" | ||
|
||
- name: "Install locked dependencies with composer" | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Create cache directory for friendsofphp/php-cs-fixer" | ||
run: mkdir -p .build/php-cs-fixer | ||
|
||
- name: "Cache cache directory for friendsofphp/php-cs-fixer" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: "~/.build/php-cs-fixer" | ||
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}" | ||
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-" | ||
|
||
- name: "Run eslint" | ||
run: "npm run eslint" | ||
|
||
- name: "Run friendsofphp/php-cs-fixer" | ||
run: "composer php-cs-fixer" | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Fix styling |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
$finder = Symfony\Component\Finder\Finder::create() | ||
->in([ | ||
__DIR__ . '/php', | ||
__DIR__ . '/app/app', | ||
__DIR__ . '/app/config', | ||
__DIR__ . '/app/database', | ||
__DIR__ . '/app/lang', | ||
__DIR__ . '/app/routes', | ||
__DIR__ . '/app/tests', | ||
]) | ||
->name('*.php') | ||
->ignoreDotFiles(true) | ||
->ignoreVCS(true); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PHP70Migration' => true, | ||
'@PHP71Migration' => true, | ||
'@PHP73Migration' => true, | ||
'@PHP74Migration' => true, | ||
'@PHP80Migration' => true, | ||
'@PSR2' => true, | ||
'array_indentation' => true, | ||
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'], | ||
'blank_line_before_statement' => ['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try']], | ||
'class_attributes_separation' => ['elements' => ['method' => 'one']], | ||
'concat_space' => ['spacing' => 'one'], | ||
'increment_style' => ['style' => 'post'], | ||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline', 'keep_multiple_spaces_after_comma' => true], | ||
'method_chaining_indentation' => true, | ||
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'], | ||
'no_extra_blank_lines' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unused_imports' => true, | ||
'no_whitespace_before_comma_in_array' => true, | ||
'not_operator_with_successor_space' => false, | ||
'ordered_imports' => true, | ||
'phpdoc_scalar' => true, | ||
'phpdoc_single_line_var_spacing' => true, | ||
'phpdoc_var_without_name' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'semicolon_after_instruction' => false, | ||
'simple_to_complex_string_variable' => true, | ||
'strict_comparison' => true, | ||
'ternary_operator_spaces' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'trim_array_spaces' => true, | ||
'unary_operator_spaces' => true, | ||
'yoda_style' => false, | ||
]) | ||
->setFinder($finder) | ||
->setRiskyAllowed(true) | ||
->setUsingCache(false); |
Oops, something went wrong.