Skip to content

Commit 17cde01

Browse files
committed
feat: add Twig CS Fixer
1 parent 1d9f14b commit 17cde01

File tree

3 files changed

+147
-5
lines changed

3 files changed

+147
-5
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ tests/Resources/download/*
9090
tests/UI/tsconfig.tsbuildinfo
9191
tests/Unit/.phpunit.result.cache
9292
.phpunit.result.cache
93+
.twig-cs-fixer.cache
9394
tests/Integration/.phpunit.result.cache
9495
tests-legacy/.phpunit.result.cache
9596

@@ -229,4 +230,4 @@ docker-compose.override.yml
229230
/.env.*.local
230231

231232
# config vscode
232-
.hintrc
233+
.hintrc

composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@
203203
"symfony/browser-kit": "6.4.*",
204204
"symfony/css-selector": "6.4.*",
205205
"symfony/phpunit-bridge": "6.4.*",
206-
"symfony/stopwatch": "6.4.*"
206+
"symfony/stopwatch": "6.4.*",
207+
"vincentlanglet/twig-cs-fixer": "^3.1"
207208
},
208209
"config": {
209210
"allow-plugins": {
@@ -302,6 +303,8 @@
302303
"@composer integration-tests",
303304
"@composer integration-behaviour-tests"
304305
],
306+
"twig": "@php ./vendor/bin/twig-cs-fixer lint \"src/PrestaShopBundle/Resources/views\"",
307+
"twig:fix": "@php ./vendor/bin/twig-cs-fixer fix \"src/PrestaShopBundle/Resources/views\"",
305308
"unit-tests": [
306309
"@php -d date.timezone=UTC ./vendor/phpunit/phpunit/phpunit -c tests/Unit/phpunit.xml"
307310
]

composer.lock

+141-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)