5.4.4 • Published 10 months ago

@prezly/eslint-config v5.4.4

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Prezly code style configurations

PHP Code Style checker (and fixer) is built with Easy-Coding-Standard.

Usage

  1. (Optional) Add prefixed ECS CLI tool into your composer requirements (if you're not a fan of resolving conflicts with enormous dependencies list of simplify/easy-coding-standard).

    composer require --dev symplify/easy-coding-standard-prefixed
  2. Link prezly/code-style repo as composer dependency

    composer require prezly/code-style:~4.0
  3. Include the provided configuration into your project.

    Simply create an ecs.php file in your project root and include the ecs.php provided by this package into it.

    <?php
     
    // Include the stock prezly/code-style config as is.
    return require __DIR__ . '/vendor/prezly/code-style/ecs.php';
  4. If you need to extend or override the stock configuration, you can of course do it by adding code on top of it:

    <?php
    
    declare(strict_types=1);
    
    use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
    use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
    
    return static function (ContainerConfigurator $config): void {
        // Include the stock prezly/code-style config.
        (require __DIR__ . '/vendor/prezly/code-style/ecs.php')($config);
    
        $services = $config->services();
    
        // Override stock preset configuration.
        $services->set(BinaryOperatorSpacesFixer::class)->call('configure', [
            [
                'operators' => [
                    '=>' => 'align',
                ],
            ],
        ]);
    };
  5. Run checks (you can also configure your CI to run this for you on every push):

    vendor/bin/ecs check src/
  6. Fix problems:

    vendor/bin/ecs check src/ --fix
5.4.4

10 months ago

5.4.3

10 months ago

5.4.2

1 year ago

5.4.0

1 year ago

5.3.2

2 years ago

5.3.1

2 years ago

5.3.0

2 years ago

5.2.0

2 years ago

5.0.2

2 years ago

5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.5.1-3

2 years ago

4.5.1-0

2 years ago

4.5.1-1

2 years ago

4.5.1-2

2 years ago

4.4.2-0

2 years ago

4.5.0

2 years ago

4.4.1

2 years ago

4.4.0

2 years ago

4.2.1-2

3 years ago

4.3.2

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.1-0

3 years ago

4.2.1-1

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

4.0.0-9

3 years ago

4.0.0-8

3 years ago

4.0.0-7

3 years ago

4.0.0-6

3 years ago

4.0.0-5

3 years ago

4.0.0-4

3 years ago

4.0.0-3

3 years ago

4.0.0-2

3 years ago

4.0.0-1

3 years ago

4.0.0-0

3 years ago

0.1.0-5

3 years ago

0.1.0-4

3 years ago

0.1.0-3

3 years ago

0.1.0-2

3 years ago

0.1.0-1

3 years ago