Skip to content

Commit

Permalink
Add some instruction on readme (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed May 4, 2024
1 parent e38659e commit 30dc207
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ Removes any space before and after opening and closing of arrays and hashes.

## Custom configuration

By default, the twig-cs-fixer standard is enabled with the twig coding standard rules and some extra rules.
This tool also provides a standard with only the twig rules
and another standard with extra rules from the symfony coding standards.

Everything is configurable, so take a look at the following documentation:
- [CLI options](docs/command.md)
- [Configuration file](docs/configuration.md)
- [How to disable a rule on a specific file or line](docs/identifiers.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ By default, the twig-cs-fixer standard is enabled with the twig coding standard
- `TrailingCommaSingleLineRule`: ensures that single-line arrays, objects and argument lists do not have a trailing comma.
- `TrailingSpaceRule`: ensures that files have no trailing spaces.

If you want to use the basic Twig standard, another standard and/or add/disable a rule, you can provide
If you want to use the basic Twig standard, another standard and/or add/remove a rule, you can provide
your own configuration with a `.twig-cs-fixer.php` or `.twig-cs-fixer.dist.php` file which returns
a `TwigCsFixer\Config\Config` class:
a `TwigCsFixer\Config\Config` instance:

```php
<?php
Expand Down Expand Up @@ -65,8 +65,8 @@ return $config;

By default, all `.twig` files in the current directory are linted, except the ones in the `vendor` directory.

If you want to lint specific files or directories you can pass them as argument. If you want a more sophisticated
rule, you can configure it in the config file:
If you want to lint specific files or directories you can pass them as argument.
If you want a more sophisticated rule, you can configure it in the config file:

```php
<?php
Expand Down

0 comments on commit 30dc207

Please sign in to comment.