mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
style: [prettier] Autoformat code via pre-commit hook
This commit is contained in:
parent
562cdbaeff
commit
efd094a9a4
5 changed files with 63 additions and 20 deletions
10
.github/workflows/pre-commit.yml
vendored
10
.github/workflows/pre-commit.yml
vendored
|
|
@ -6,10 +6,10 @@ on:
|
||||||
- main
|
- main
|
||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/**'
|
- ".github/workflows/**"
|
||||||
- 'scripts/**'
|
- "scripts/**"
|
||||||
- 'images/**'
|
- "images/**"
|
||||||
- 'apps.json'
|
- "apps.json"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.10.6'
|
python-version: "3.10.6"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
2
.github/workflows/update-hooks.yml
vendored
2
.github/workflows/update-hooks.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Update pre-commit hooks
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 4 * * 0'
|
- cron: "0 4 * * 0"
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
||||||
4
.vscode/extensions.json
vendored
4
.vscode/extensions.json
vendored
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
"_comment": "See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.",
|
"_comment": "See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.",
|
||||||
"_comment_format": "Extension identifier format: ${publisher}.${name}. Example: vscode.csharp",
|
"_comment_format": "Extension identifier format: ${publisher}.${name}. Example: vscode.csharp",
|
||||||
"recommendations": [
|
"recommendations": ["ms-vscode-remote.remote-containers"],
|
||||||
"ms-vscode-remote.remote-containers"
|
|
||||||
],
|
|
||||||
"unwantedRecommendations": []
|
"unwantedRecommendations": []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
65
package.json
65
package.json
|
|
@ -12,7 +12,10 @@
|
||||||
"semantic-release": "^24.2.3"
|
"semantic-release": "^24.2.3"
|
||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
"branches": ["main", "dev"],
|
"branches": [
|
||||||
|
"main",
|
||||||
|
"dev"
|
||||||
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@semantic-release/commit-analyzer",
|
"@semantic-release/commit-analyzer",
|
||||||
[
|
[
|
||||||
|
|
@ -21,16 +24,56 @@
|
||||||
"preset": "conventionalcommits",
|
"preset": "conventionalcommits",
|
||||||
"presetConfig": {
|
"presetConfig": {
|
||||||
"types": [
|
"types": [
|
||||||
{ "type": "feat", "section": "✨ Features", "hidden": false },
|
{
|
||||||
{ "type": "fix", "section": "🐞 Bug Fixes", "hidden": false },
|
"type": "feat",
|
||||||
{ "type": "docs", "section": "📝 Documentation", "hidden": false },
|
"section": "✨ Features",
|
||||||
{ "type": "style", "section": "🎨 Style Changes", "hidden": false },
|
"hidden": false
|
||||||
{ "type": "refactor", "section": "🔧 Refactoring", "hidden": false },
|
},
|
||||||
{ "type": "perf", "section": "⚡ Performance", "hidden": false },
|
{
|
||||||
{ "type": "test", "section": "✅ Tests", "hidden": false },
|
"type": "fix",
|
||||||
{ "type": "build", "section": "🚢 Build System", "hidden": false },
|
"section": "🐞 Bug Fixes",
|
||||||
{ "type": "ci", "section": "🚀 CI/CD", "hidden": false },
|
"hidden": false
|
||||||
{ "type": "chore", "section": "🧹 Chores", "hidden": false }
|
},
|
||||||
|
{
|
||||||
|
"type": "docs",
|
||||||
|
"section": "📝 Documentation",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "style",
|
||||||
|
"section": "🎨 Style Changes",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "refactor",
|
||||||
|
"section": "🔧 Refactoring",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"section": "⚡ Performance",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"section": "✅ Tests",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"section": "🚢 Build System",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ci",
|
||||||
|
"section": "🚀 CI/CD",
|
||||||
|
"hidden": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "chore",
|
||||||
|
"section": "🧹 Chores",
|
||||||
|
"hidden": false
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def check_python_version():
|
def check_python_version():
|
||||||
version = sys.version
|
version = sys.version
|
||||||
print(f"Python version: {version}")
|
print(f"Python version: {version}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
check_python_version()
|
check_python_version()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue