Skip to content

Commit

Permalink
Merge branch 'main' into fix/char-bazaar
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Mar 6, 2024
2 parents fb64314 + 6409b80 commit 3bbff97
Show file tree
Hide file tree
Showing 207 changed files with 59,241 additions and 28,619 deletions.
16 changes: 4 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
ij_any_keep_indents_on_empty_lines = false
# quote_type = single

[*.ts]
ij_typescript_force_quote_style = true
ij_typescript_use_double_quotes = false
# ij_typescript_imports_wrap = split_into_lines
ij_typescript_spaces_within_imports = true
ij_typescript_spaces_within_object_type_braces = true
ij_typescript_spaces_within_object_literal_braces = true
quote_type = single

[*.{html,json,twig}]
indent_size = 2
# [*.php]
# indent_size = 4

[*.md]
max_line_length = off
Expand Down
13 changes: 12 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,23 @@ Please delete options that are not relevant.

**Test Configuration**:

- MyAAC Version: (latest: 0.8.15)
- MyAAC Version: (latest: 0.8.16)
- Browser:
- [ ] Chrome
- [ ] Firefox
- [ ] Opera
- [ ] Safari
- [ ] Edge
- [ ] Other
- Operating System:
- [ ] Windows
- [ ] Ubuntu
- [ ] MacOS
- [ ] Other

## Checklist

- [ ] I've created separated branch from main updated
- [ ] My code follows the style guidelines of this project
- [ ] I followed project rules, best practices, and code indentation
- [ ] I have performed a self-review of my own code
Expand Down
4 changes: 3 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- any: ['install/**/*']

"Area: Plugins":
- any: ['plugins/**/*']
- any: ['plugins/**/*', 'payments/**/*']

"Area: System":
- any: ['system/**/*']
Expand All @@ -20,3 +20,5 @@
"Area: Tools":
- any: ['tools/**/*']

"Area: Workflow":
- any: ['./github/**/*']
23 changes: 10 additions & 13 deletions .github/workflows/phplint.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: PHP Linting
on:
pull_request:
branches: [master]
push:
branches: [master]

pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
jobs:
phplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: overtrue/[email protected]
with:
path: .
options: --exclude="system/libs/polyfill-mbstring/bootstrap80.php"
phplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: overtrue/[email protected]
with:
path: .
options: --exclude="system/libs/polyfill-mbstring/bootstrap80.php"
55 changes: 55 additions & 0 deletions .github/workflows/prettier-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Format Prettier
on:
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
jobs:
cancel-runs:
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

prettier:
runs-on: ubuntu-latest
steps:
- name: Set up Git
if: ${{ github.ref != 'refs/heads/main' }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Actions checkout
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
if: ${{ github.ref != 'refs/heads/main' }}
run: npm install prettier @prettier/plugin-php stylelint-prettier

- name: Run prettier code format
if: ${{ github.ref != 'refs/heads/main' }}
run: npx prettier --write **/*.{php,js} --plugin=@prettier/plugin-php --ignore-unknown && npx stylelint **/*.css --fix

- name: Run add and commit
if: ${{ github.ref != 'refs/heads/main' }}
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'PHP code format - (prettier)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ignore system libs
plugins/
system/libs/PagSeguroLibrary
system/libs/phpmailer
system/libs/polyfill-mbstring
system/libs/pot
system/libs/semver
system/libs/Twig
system/cache
system/php_sessions
node_modules

# Files
login.php

# Styles
admin/bootstrap/pace/templates/pace-theme-loading-bar.tmpl.css
admin/bootstrap/pace/templates/pace-theme-mac-osx.tmpl.css
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"overrides": [
{
"files": [
"*.php"
],
"options": {
"parser": "php",
"singleQuote": true,
"semi": false,
"tabWidth": 2,
"printWidth": 100,
"trailingComma": "none"
}
}
]
}
8 changes: 8 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": ["stylelint-prettier"],
"ignoreFiles": ["**/*.min.css"],
"rules": {
"prettier/prettier": true
},
"extends": ["stylelint-prettier/recommended"]
}
Loading

0 comments on commit 3bbff97

Please sign in to comment.