-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Twig CS Fixer for lint and fix tasks (#254)
* Add Twig CS Fixer for Skeleton * Fix code style for config files * Adjust tasks * Update version in composer.json file
- Loading branch information
1 parent
262ac02
commit 2e30526
Showing
10 changed files
with
51 additions
and
12 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 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,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
$ruleset = new TwigCsFixer\Ruleset\Ruleset(); | ||
$ruleset->addStandard(new TwigCsFixer\Standard\TwigCsFixer()); | ||
|
||
$finder = new TwigCsFixer\File\Finder(); | ||
$finder->in('templates/'); | ||
|
||
$config = new TwigCsFixer\Config\Config(); | ||
$config->allowNonFixableRules(); | ||
$config->setRuleset($ruleset); | ||
$config->setFinder($finder); | ||
|
||
// $config->addTwigExtension(new Sulu\Twig\Extensions\PortalExtension()); | ||
// $config->addTokenParser(new Sulu\Twig\Extensions\TokenParser\PortalTokenParser()); | ||
|
||
return $config; |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% extends "base.html.twig" %} | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block content %} | ||
<h1>{{ content.title }}</h1> | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% extends "base.html.twig" %} | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block content %} | ||
<h1>{{ content.title }}</h1> | ||
|
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