├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── bin ├── mediact-testing-suite ├── phpcsheader.txt ├── phpmdheader.txt ├── phpstanheader.txt └── phpunitheader.txt ├── composer.json ├── config └── default │ └── grumphp.yml ├── grumphp.yml ├── pdepend.xml ├── src ├── ConfigResolver.php ├── Factory │ ├── ProcessFactory.php │ └── ProcessFactoryInterface.php ├── GrumPHP │ └── ParameterFixExtension.php ├── Installer │ ├── ArchiveExcludeInstaller.php │ ├── ConfigInstaller.php │ ├── FilesInstaller.php │ ├── InstallerInterface.php │ ├── PackagesInstaller.php │ └── PipelinesInstaller.php ├── MappingResolver.php ├── Plugin.php ├── ProjectTypeResolver.php └── installers.php └── templates ├── config └── default.json ├── files ├── alumio │ └── bitbucket-pipelines.yml ├── default │ ├── bitbucket-pipelines.yml │ ├── dotgitignore │ ├── grumphp.yml │ ├── pdepend.xml │ ├── phpcs.xml │ ├── phpmd.xml │ ├── phpstan.neon │ └── phpunit_dist.xml ├── laravel │ ├── bitbucket-pipelines.yml │ ├── dotgitignore │ ├── grumphp.yml │ ├── pdepend.xml │ ├── phpcs.xml │ ├── phpmd.xml │ └── phpstan.neon ├── magento1 │ ├── .eslintignore │ ├── .eslintrc.json │ ├── bitbucket-pipelines.yml │ ├── package.json │ └── phpcs.xml └── magento2 │ ├── .eslintignore │ ├── .eslintrc.json │ ├── bitbucket-pipelines.yml │ ├── package.json │ ├── phpcs.xml │ ├── phpmd.xml │ └── phpstan.neon └── mapping ├── files ├── pipelines ├── alumio ├── default ├── magento1 ├── magento2 └── mediact └── project ├── alumio ├── default ├── laravel ├── magento1 └── magento2 /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [2.9.1] 8 | ### Changed 9 | - [AD-210] Run phpcs with the -s flag to output the explicit rule that is failing. 10 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright © `2017` `MediaCT` 5 | 6 | Permission is hereby granted, free of charge, to any person 7 | obtaining a copy of this software and associated documentation 8 | files (the “Software”), to deal in the Software without 9 | restriction, including without limitation the rights to use, 10 | copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the 12 | Software is furnished to do so, subject to the following 13 | conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 20 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 22 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 25 | OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mediact/testing-suite/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mediact/testing-suite/?branch=master) 2 | 3 | # [ABANDONED] MediaCT Testing Suite 4 | This package has been abandoned and will not get any support. We replaced it with the 5 | [youwe testing suite](https://github.com/YouweGit/testing-suite). 6 | 7 | This package serves as an umbrella package for several of MediaCT's testing 8 | packages. 9 | 10 | # Installation 11 | 12 | ``` 13 | composer require mediact/testing-suite --dev 14 | ``` 15 | 16 | # Usage 17 | 18 | The testing suite can be run through the GrumPHP command. 19 | 20 | ``` 21 | vendor/bin/grumphp run 22 | ``` 23 | 24 | The testing suite is also automatically run at each git commit using a git 25 | commit hook. 26 | 27 | # Components 28 | 29 | The following components are part of the testing suite. 30 | 31 | ## Coding style validation (PHPCS) 32 | 33 | The coding style is validated using PHPCS and uses the 34 | [MediaCT Coding Standard](https://github.com/mediact/coding-standard). 35 | 36 | During the installation of the testing suite a file called `phpcs.xml` is added to 37 | the root of the repository which refers to the coding standard. To make 38 | adjustments to the coding standard this file can be edited and committed. 39 | 40 | Depending on the composer type of the project an other standard will be used: 41 | 42 | - `magento-module`: [MediaCT Coding Standard Magento1](https://github.com/mediact/coding-standard-magento1) 43 | - `magento2-module`: [MediaCT Coding Standard Magento2](https://github.com/mediact/coding-standard-magento2) 44 | - `magento-project`: [MediaCT Coding Standard Magento1](https://github.com/mediact/coding-standard-magento1) 45 | - `magento2-project`: [MediaCT Coding Standard Magento2](https://github.com/mediact/coding-standard-magento2) 46 | 47 | ### Overriding the type 48 | 49 | The type for a project can be overridden in the composer.json `config` node by 50 | adding `testing-suite-type` to the configuration. 51 | This will allow the use of standards for a different type. 52 | The allowed values for this node are: 53 | - magento1 54 | - magento2 55 | - default 56 | 57 | The configurations looks like the following: 58 | ```json 59 | { 60 | "config": { 61 | "mediact-testing-suite": { 62 | "type": "magento2" 63 | } 64 | } 65 | } 66 | ``` 67 | 68 | This can be helpful when development is done in the `app/code` folder and force 69 | the testing suite to automatically select the correct standards. 70 | 71 | ## Coding complexity validation (PHPMD) 72 | 73 | The complexity of the code is validated using PHPMD. A file called `phpmd.xml` 74 | is added during the installation of the testing suite. 75 | 76 | ## Static code analysis (PHPStan) 77 | 78 | Static code analysis is executed using PHPStan. A file called `phpstan.neon` 79 | is added during the installation of the testing suite. 80 | 81 | ## Unit tests (PHPUnit) 82 | 83 | Unit tests are executed using PHPUnit. A file called `phpunit.xml` is added 84 | during the installation of the testing suite. 85 | 86 | The unit tests are expected to be in a directory called `tests`. The code is 87 | expected to be in a directory called `src`. 88 | 89 | ## Bitbucket Pipelines 90 | 91 | When the project is hosted on Bitbucket a 92 | [Pipelines](https://bitbucket.org/product/features/pipelines) script will be 93 | installed. The scripts supports a callback that will be called before 94 | `composer install` is executed. This callback can be used to add credentials 95 | to composer. To enable the callback go to **Bitbucket Settings > Pipelines > 96 | Environment Variables** and add an environment variable called 97 | `COMPOSER_PRE_INSTALL_CALLBACK`. 98 | 99 | Example to add basic authentication for repo.example.com: 100 | 101 | ``` 102 | composer config --global http-basic.repo.example.com $YOUR_USER $YOUR_PASSWORD 103 | ``` 104 | 105 | ## ESLint 106 | Javascript linting for Magento 1 and Magento 2 projects is executed using 107 | [ESLint](https://eslint.org/). Two files called `.eslintrc.json` and 108 | `.eslintignore` are added to the root of the repository which contains the 109 | coding standards and files excluded from analysis. 110 | 111 | A third file called `package.json` is added which contains the needed npm 112 | modules. Run `npm install` after the installation in order to enable ESLint: 113 | 114 | ```shell 115 | npm install 116 | ``` 117 | 118 | # Integration with PHPStorm 119 | 120 | When the testing suite is installed in a PHPStorm environment it automatically 121 | configures PHPStorm to use the correct coding style. 122 | 123 | To enable PHPCS and PHPMD inspections in PHPStorm the correct binaries need 124 | to be configured. This is a global setting in PHPStorm and can therefore not 125 | be configured by the testing suite. 126 | 127 | The recommended way to get the correct binaries is by installing the MediaCT 128 | Coding Standard globally. 129 | 130 | ``` 131 | composer global require mediact/coding-standard 132 | ``` 133 | 134 | The package will be installed in the home directory of composer. The location 135 | of this directory can be found using the following command: 136 | 137 | ``` 138 | composer global config home 139 | ``` 140 | 141 | Open PHPStorm and go to __Settings > Languages & Frameworks > PHP > Code Sniffer__. 142 | 143 | Choose "Local" for the development environment and fill in the full path to 144 | `/vendor/bin/phpcs`. 145 | 146 | Then go to __Settings > Languages & Frameworks > PHP > Mess Detector__. 147 | 148 | Choose "Local" for the development environment and fill in the full path to 149 | `/vendor/bin/phpmd`. 150 | 151 | After these adjustments the coding style and complexity will be validated 152 | while typing in PHPStorm. 153 | 154 | To enable ESLint open PHPStorm and go to 155 | __Settings > Languages & Frameworks > Javascript > Code Quality Tools > ESLint__. 156 | 157 | Enable ESLint by checking `Enabled`. Then set the `Node interpreter` 158 | to `Project` and `Configuration file` to `Automatic Search`. 159 | 160 | -------------------------------------------------------------------------------- /bin/mediact-testing-suite: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | COMPOSER=$(which composer.phar || which composer) 3 | VENDOR=$($COMPOSER config vendor-dir) 4 | SCRIPTDIR="$VENDOR/mediact/testing-suite/bin/" 5 | if [ ! -d "$SCRIPTDIR" ] 6 | then 7 | SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}") 8 | fi 9 | BIN=$($COMPOSER config bin-dir) 10 | 11 | echo 'The use of this file is deprecated, please run: "grumphp run".' 12 | $BIN/grumphp run 13 | -------------------------------------------------------------------------------- /bin/phpcsheader.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ██████▒ ██ ██ ██████▒ ▒████▒ ▒████▒ 5 | ███████▒ ██ ██ ███████▒ ▓██████ ▒██████ 6 | ██ ▒██ ██ ██ ██ ▒██ ▒██▒ ░█ ██▒ ▒█ 7 | ██ ██ ██ ██ ██ ██ ██▓ ██ 8 | ██ ▒██ ██ ██ ██ ▒██ ██░ ███▒ 9 | ███████▒ ████████ ███████▒ ██ ▒█████▒ 10 | ██████▒ ████████ ██████▒ ██ ░█████▒ 11 | ██ ██ ██ ██ ██░ ▒███ 12 | ██ ██ ██ ██ ██▓ ██ 13 | ██ ██ ██ ██ ▒██▒ ░█ █▒░ ▒██ 14 | ██ ██ ██ ██ ▓██████ ███████▒ 15 | ██ ██ ██ ██ ▒████▒ ░█████▒ 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bin/phpmdheader.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ██████▒ ██ ██ ██████▒ ███ ███ █████▒ 5 | ███████▒ ██ ██ ███████▒ ███ ███ ███████ 6 | ██ ▒██ ██ ██ ██ ▒██ ███▒▒███ ██ ▒██▒ 7 | ██ ██ ██ ██ ██ ██ ███▓▓███ ██ ▒██ 8 | ██ ▒██ ██ ██ ██ ▒██ ██▓██▓██ ██ ░██ 9 | ███████▒ ████████ ███████▒ ██▒██▒██ ██ ██ 10 | ██████▒ ████████ ██████▒ ██░██░██ ██ ██ 11 | ██ ██ ██ ██ ██ ██ ██ ██ ░██ 12 | ██ ██ ██ ██ ██ ██ ██ ▒██ 13 | ██ ██ ██ ██ ██ ██ ██ ▒██▒ 14 | ██ ██ ██ ██ ██ ██ ███████ 15 | ██ ██ ██ ██ ██ ██ █████▒ 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bin/phpstanheader.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ██████▒ ██ ██ ██████▒ ▒████▒ 5 | ███████▒ ██ ██ ███████▒ ▒██████ ██ 6 | ██ ▒██ ██ ██ ██ ▒██ ██▒ ▒█ ██ 7 | ██ ██ ██ ██ ██ ██ ██ ███████ ▒████▓ ██░████ 8 | ██ ▒██ ██ ██ ██ ▒██ ███▒ ███████ ██████▓ ███████▓ 9 | ███████▒ ████████ ███████▒ ▒█████▒ ██ █▒ ▒██ ███ ▒██ 10 | ██████▒ ████████ ██████▒ ░█████▒ ██ ▒█████ ██ ██ 11 | ██ ██ ██ ██ ▒███ ██ ░███████ ██ ██ 12 | ██ ██ ██ ██ ██ ██ ██▓░ ██ ██ ██ 13 | ██ ██ ██ ██ █▒░ ▒██ ██░ ██▒ ███ ██ ██ 14 | ██ ██ ██ ██ ███████▒ █████ ████████ ██ ██ 15 | ██ ██ ██ ██ ░█████▒ ░████ ▓███░██ ██ ██ 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bin/phpunitheader.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | ██ 4 | ██████▒ ██ ██ ██████▒ ██ ██ ██ 5 | ███████▒ ██ ██ ███████▒ ██ ██ ██ ██ 6 | ██ ▒██ ██ ██ ██ ▒██ ██ ██ ██ 7 | ██ ██ ██ ██ ██ ██ ██ ██ ██░████ ████ ███████ 8 | ██ ▒██ ██ ██ ██ ▒██ ██ ██ ███████▓ ████ ███████ 9 | ███████▒ ████████ ███████▒ ██ ██ ███ ▒██ ██ ██ 10 | ██████▒ ████████ ██████▒ ██ ██ ██ ██ ██ ██ 11 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 12 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 13 | ██ ██ ██ ██ ██▓ ▓██ ██ ██ ██ ██░ 14 | ██ ██ ██ ██ ▒██████▒ ██ ██ ████████ █████ 15 | ██ ██ ██ ██ ▒████▒ ██ ██ ████████ ░████ 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mediact/testing-suite", 3 | "description": "Contains MediaCT's default testing packages.", 4 | "type": "composer-plugin", 5 | "license": "MIT", 6 | "prefer-stable": true, 7 | "minimum-stability": "stable", 8 | "abandoned": "youwe/testing-suite", 9 | "authors": [ 10 | { 11 | "name": "MediaCT B.V.", 12 | "email": "contact@mediact.nl" 13 | }, 14 | { 15 | "name": "Len Lorijn", 16 | "role": "developer" 17 | }, 18 | { 19 | "name": "Jan-Marten de Boer", 20 | "role": "developer" 21 | } 22 | ], 23 | "require": { 24 | "php": "^7.1", 25 | "composer-plugin-api": "^1.1 || ^2.0", 26 | "enlightn/security-checker": "^1.5", 27 | "kint-php/kint": "@stable", 28 | "mediact/coding-standard": "@stable", 29 | "mediact/coding-standard-phpstorm": "@stable", 30 | "mediact/composer-dependency-installer": "^1.0", 31 | "mediact/composer-file-installer": "^1.0", 32 | "mediact/composer-unclog-plugin": "^1.0", 33 | "phpro/grumphp": ">=0.19 <1.0", 34 | "phpstan/phpstan": "@stable", 35 | "phpunit/phpunit": "@stable", 36 | "php-parallel-lint/php-parallel-lint": "^1.2" 37 | }, 38 | "require-dev": { 39 | "composer/composer": "@stable", 40 | "mikey179/vfsstream": "@stable" 41 | }, 42 | "replace": { 43 | "sensiolabs/security-checker": "*" 44 | }, 45 | "bin": [ 46 | "bin/mediact-testing-suite" 47 | ], 48 | "extra": { 49 | "scripts": { 50 | "post-install-cmd": [ 51 | "npm install --save-dev husky lint-staged", 52 | "npx husky install", 53 | "npm set-script prepare \"husky install\"", 54 | "npx husky add .husky/pre-commit \"npx lint-staged\"" 55 | ] 56 | }, 57 | "grumphp": { 58 | "config-default-path": "grumphp.yml" 59 | }, 60 | "class": "Mediact\\TestingSuite\\Composer\\Plugin" 61 | }, 62 | "autoload": { 63 | "psr-4": { 64 | "Mediact\\TestingSuite\\Composer\\": "src" 65 | } 66 | }, 67 | "autoload-dev": { 68 | "psr-4": { 69 | "Mediact\\TestingSuite\\Composer\\Tests\\": "tests" 70 | } 71 | }, 72 | "archive": { 73 | "exclude": [ 74 | "/tests", 75 | "/.gitignore", 76 | "/.gitattributes", 77 | "/phpstan.neon", 78 | "/phpcs.xml", 79 | "/phpmd.xml", 80 | "/phpunit.xml" 81 | ] 82 | }, 83 | "config": { 84 | "allow-plugins": { 85 | "mediact/coding-standard-phpstorm": true, 86 | "mediact/composer-unclog-plugin": true, 87 | "phpro/grumphp": true 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /config/default/grumphp.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Default settings for testing suite tasks 3 | composer.strict: true 4 | 5 | jsonlint.detect_key_conflicts: true 6 | 7 | xmllint.load_from_net: true 8 | xmllint.x_include: true 9 | xmllint.dtd_validation: true 10 | xmllint.scheme_validation: true 11 | xmllint.triggered_by: [xml] 12 | xmllint.ignore_patterns: 13 | # Uses an incomplete definition, which conflicts when 14 | # is defined. 15 | - /^phpcs.xml$/ 16 | - /^phpmd.xml$/ 17 | - /^phpunit.xml$/ 18 | - /^pdepend.xml$/ 19 | 20 | yamllint.parse_constant: true 21 | 22 | phpcs.standard: ./phpcs.xml 23 | phpcs.triggered_by: [php] 24 | 25 | phplint.exclude: ['vendor'] 26 | phplint.jobs: ~ 27 | phplint.short_open_tag: false 28 | phplint.ignore_patterns: [ ] 29 | phplint.triggered_by: ['php', 'phtml'] 30 | 31 | phpmd.exclude: [] 32 | phpmd.ruleset: 33 | - ./phpmd.xml 34 | phpmd.triggered_by: [php] 35 | 36 | phpstan.autoload_file: ~ 37 | phpstan.configuration: ./phpstan.neon 38 | phpstan.level: 4 39 | phpstan.triggered_by: [php] 40 | 41 | phpunit.config_file: ./phpunit.xml 42 | 43 | securitychecker.lockfile: ./composer.lock 44 | securitychecker.run_always: true 45 | 46 | git_blacklist.keywords: 47 | - "die(" 48 | - "var_dump(" 49 | - "exit;" 50 | - "Magento\\\\Framework\\\\App\\\\ObjectManager" 51 | git_blacklist.whitelist_patterns: [] 52 | git_blacklist.triggered_by: [ 'php' ] 53 | git_blacklist.regexp_type: G 54 | git_blacklist.match_word: false 55 | 56 | grumphp: 57 | extensions: 58 | - Mediact\TestingSuite\Composer\GrumPHP\ParameterFixExtension 59 | 60 | ascii: 61 | failed: ~ 62 | succeeded: ~ 63 | 64 | parallel: 65 | enabled: true 66 | 67 | # Default tasks for testing suite 68 | tasks: 69 | composer: 70 | strict: '%composer.strict%' 71 | 72 | jsonlint: 73 | detect_key_conflicts: '%jsonlint.detect_key_conflicts%' 74 | 75 | git_blacklist: 76 | keywords: '%git_blacklist.keywords%' 77 | whitelist_patterns: '%git_blacklist.whitelist_patterns%' 78 | triggered_by: '%git_blacklist.triggered_by%' 79 | regexp_type: '%git_blacklist.regexp_type%' 80 | match_word: '%git_blacklist.match_word%' 81 | 82 | xmllint: 83 | load_from_net: '%xmllint.load_from_net%' 84 | x_include: '%xmllint.x_include%' 85 | dtd_validation: '%xmllint.dtd_validation%' 86 | scheme_validation: '%xmllint.scheme_validation%' 87 | triggered_by: '%xmllint.triggered_by%' 88 | ignore_patterns: '%xmllint.ignore_patterns%' 89 | 90 | yamllint: 91 | parse_constant: '%yamllint.parse_constant%' 92 | 93 | phpcs: 94 | standard: '%phpcs.standard%' 95 | triggered_by: '%phpcs.triggered_by%' 96 | 97 | phplint: 98 | exclude: '%phplint.exclude%' 99 | jobs: '%phplint.jobs%' 100 | short_open_tag: '%phplint.short_open_tag%' 101 | ignore_patterns: '%phplint.ignore_patterns%' 102 | triggered_by: '%phplint.triggered_by%' 103 | 104 | phpmd: 105 | exclude: '%phpmd.exclude%' 106 | ruleset: '%phpmd.ruleset%' 107 | triggered_by: '%phpmd.triggered_by%' 108 | 109 | phpstan: 110 | autoload_file: '%phpstan.autoload_file%' 111 | configuration: '%phpstan.configuration%' 112 | level: '%phpstan.level%' 113 | triggered_by: '%phpstan.triggered_by%' 114 | 115 | phpunit: 116 | config_file: '%phpunit.config_file%' 117 | 118 | securitychecker: 119 | lockfile: '%securitychecker.lockfile%' 120 | run_always: '%securitychecker.run_always%' 121 | -------------------------------------------------------------------------------- /grumphp.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - resource: 'config/default/grumphp.yml' 3 | 4 | parameters: 5 | composer.strict: false 6 | xmllint.ignore_patterns: 7 | - /^phpcs.xml$/ 8 | - /^phpmd.xml$/ 9 | - /^phpunit.xml$/ 10 | - /^pdepend.xml$/ 11 | - /^templates/ 12 | -------------------------------------------------------------------------------- /pdepend.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | memory 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/ConfigResolver.php: -------------------------------------------------------------------------------- 1 | typeResolver = $typeResolver; 29 | $this->template = $template ?? $this->template; 30 | } 31 | 32 | /** 33 | * Resolve config. 34 | * 35 | * @return array 36 | */ 37 | public function resolve(): array 38 | { 39 | $file = sprintf($this->template, $this->typeResolver->resolve()); 40 | 41 | if (!file_exists($file)) { 42 | $file = sprintf($this->template, 'default'); 43 | } 44 | 45 | return json_decode(file_get_contents($file), true); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Factory/ProcessFactory.php: -------------------------------------------------------------------------------- 1 | = 4.2 26 | : new Process($commandLine); // Symfony < 4.2 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Factory/ProcessFactoryInterface.php: -------------------------------------------------------------------------------- 1 | setParameter( 29 | 'tasks', 30 | $container->resolveEnvPlaceholders( 31 | $container->getParameter('tasks'), 32 | true 33 | ) 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Installer/ArchiveExcludeInstaller.php: -------------------------------------------------------------------------------- 1 | resolver = $resolver; 63 | $this->io = $io; 64 | $this->file = $file ?? new JsonFile(Factory::getComposerFile()); 65 | $this->destination = $destination ?? getcwd(); 66 | $this->defaults = $defaults ?? $this->defaults; 67 | } 68 | 69 | /** 70 | * Install. 71 | * 72 | * @return void 73 | */ 74 | public function install() 75 | { 76 | $definition = $this->file->read(); 77 | $excluded = $definition['archive']['exclude'] ?? []; 78 | 79 | $excluded = array_map( 80 | function (string $exclude): string { 81 | return substr($exclude, 0, 1) !== '/' 82 | ? '/' . $exclude 83 | : $exclude; 84 | }, 85 | $excluded 86 | ); 87 | 88 | $files = array_merge( 89 | $this->defaults, 90 | array_map( 91 | function (FileMappingInterface $mapping): string { 92 | return '/' . $mapping->getRelativeDestination(); 93 | }, 94 | iterator_to_array( 95 | $this->resolver->resolve() 96 | ) 97 | ) 98 | ); 99 | 100 | foreach ($files as $file) { 101 | if ( 102 | !in_array($file, $excluded) 103 | && file_exists($this->destination . $file) 104 | ) { 105 | $excluded[] = $file; 106 | $this->io->write( 107 | sprintf( 108 | 'Added: %s to archive exclude in composer.json', 109 | $file 110 | ) 111 | ); 112 | } 113 | } 114 | 115 | $definition['archive']['exclude'] = $excluded; 116 | $this->file->write($definition); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /src/Installer/ConfigInstaller.php: -------------------------------------------------------------------------------- 1 | resolver = $resolver; 43 | $this->io = $io; 44 | $this->file = $file ?? new JsonFile(Factory::getComposerFile()); 45 | } 46 | 47 | /** 48 | * Install. 49 | * 50 | * @return void 51 | */ 52 | public function install() 53 | { 54 | $definition = $this->file->read(); 55 | $config = $definition['config'] ?? []; 56 | 57 | $config = array_replace_recursive( 58 | $this->resolver->resolve(), 59 | $config 60 | ); 61 | 62 | $definition['config'] = $config; 63 | $this->file->write($definition); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Installer/FilesInstaller.php: -------------------------------------------------------------------------------- 1 | mappingResolver = $mappingResolver; 41 | $this->fileInstaller = $fileInstaller; 42 | $this->io = $io; 43 | } 44 | 45 | /** 46 | * Install. 47 | * 48 | * @return void 49 | */ 50 | public function install() 51 | { 52 | foreach ($this->mappingResolver->resolve() as $mapping) { 53 | if (file_exists($mapping->getDestination())) { 54 | continue; 55 | } 56 | 57 | $this->fileInstaller->installFile($mapping); 58 | 59 | $this->io->write( 60 | sprintf( 61 | 'Installed: %s', 62 | $mapping->getRelativeDestination() 63 | ) 64 | ); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Installer/InstallerInterface.php: -------------------------------------------------------------------------------- 1 | [], 35 | 'magento1' => [ 36 | [ 37 | 'name' => 'mediact/coding-standard-magento1', 38 | 'version' => '@stable' 39 | ] 40 | ], 41 | 'magento2' => [ 42 | [ 43 | 'name' => 'mediact/coding-standard-magento2', 44 | 'version' => '@stable' 45 | ] 46 | ], 47 | 'laravel' => [ 48 | [ 49 | 'name' => 'elgentos/laravel-coding-standard', 50 | 'version' => '@stable' 51 | ] 52 | ] 53 | ]; 54 | 55 | /** 56 | * Constructor. 57 | * 58 | * @param Composer $composer 59 | * @param ProjectTypeResolver $typeResolver 60 | * @param IOInterface $io 61 | * @param DependencyInstaller|null $installer 62 | * @param array|null $mapping 63 | */ 64 | public function __construct( 65 | Composer $composer, 66 | ProjectTypeResolver $typeResolver, 67 | IOInterface $io, 68 | DependencyInstaller $installer = null, 69 | array $mapping = null 70 | ) { 71 | $this->composer = $composer; 72 | $this->typeResolver = $typeResolver; 73 | $this->io = $io; 74 | $this->installer = $installer ?? new DependencyInstaller(); 75 | $this->mapping = $mapping ?? $this->mapping; 76 | } 77 | 78 | /** 79 | * Install. 80 | * 81 | * @return void 82 | */ 83 | public function install() 84 | { 85 | $type = $this->typeResolver->resolve(); 86 | if (!isset($this->mapping[$type])) { 87 | return; 88 | } 89 | 90 | foreach ($this->mapping[$type] as $package) { 91 | if (!$this->isPackageRequired($package['name'])) { 92 | $this->io->write( 93 | sprintf('Requiring package %s', $package['name']) 94 | ); 95 | 96 | $this->installer->installPackage( 97 | $package['name'], 98 | $package['version'] 99 | ); 100 | } 101 | } 102 | } 103 | 104 | /** 105 | * Whether a package has been required. 106 | * 107 | * @param string $packageName 108 | * 109 | * @return bool 110 | */ 111 | private function isPackageRequired(string $packageName): bool 112 | { 113 | foreach ($this->composer->getPackage()->getRequires() as $require) { 114 | if ($require->getTarget() === $packageName) { 115 | return true; 116 | } 117 | } 118 | 119 | return false; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/Installer/PipelinesInstaller.php: -------------------------------------------------------------------------------- 1 | fileInstaller = $fileInstaller; 64 | $this->io = $io; 65 | $this->processFactory = $processFactory; 66 | $this->typeResolver = $typeResolver; 67 | $this->destination = $destination ?? getcwd(); 68 | $this->pattern = $pattern ?? $this->pattern; 69 | $this->filename = $filename ?? $this->filename; 70 | } 71 | 72 | /** 73 | * Install. 74 | * 75 | * @return void 76 | */ 77 | public function install() 78 | { 79 | if ( 80 | file_exists($this->destination . '/' . $this->filename) 81 | || !$this->isBitbucket() 82 | ) { 83 | return; 84 | } 85 | 86 | 87 | $files = [ 88 | __DIR__ . '/../../templates/mapping/files', 89 | sprintf( 90 | __DIR__ . '/../../templates/mapping/pipelines/%s', 91 | $this->typeResolver->resolve() 92 | ) 93 | ]; 94 | 95 | $reader = new UnixFileMappingReader( 96 | __DIR__ . '/../../templates/files', 97 | getcwd(), 98 | ...$files 99 | ); 100 | 101 | foreach ($reader as $mapping) { 102 | $this->fileInstaller->installFile($mapping); 103 | $this->io->write( 104 | sprintf( 105 | 'Installed: %s', 106 | $mapping->getRelativeDestination() 107 | ) 108 | ); 109 | } 110 | } 111 | 112 | /** 113 | * Check whether the project is on Bitbucket. 114 | * 115 | * @return bool 116 | */ 117 | private function isBitbucket(): bool 118 | { 119 | $process = $this->processFactory->create('git remote -v'); 120 | $process->run(); 121 | 122 | return strpos($process->getOutput(), $this->pattern) !== false; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/MappingResolver.php: -------------------------------------------------------------------------------- 1 | typeResolver = $typeResolver; 26 | } 27 | 28 | /** 29 | * Resolve mapping files. 30 | * 31 | * @return FileMappingReaderInterface 32 | */ 33 | public function resolve(): FileMappingReaderInterface 34 | { 35 | $files = [ 36 | __DIR__ . '/../templates/mapping/files', 37 | sprintf( 38 | __DIR__ . '/../templates/mapping/project/%s', 39 | $this->typeResolver->resolve() 40 | ) 41 | ]; 42 | 43 | return new UnixFileMappingReader( 44 | __DIR__ . '/../templates/files', 45 | getcwd(), 46 | ...$files 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Plugin.php: -------------------------------------------------------------------------------- 1 | installers = $installers; 27 | } 28 | 29 | /** 30 | * Apply plugin modifications to Composer. 31 | * 32 | * @param Composer $composer 33 | * @param IOInterface $io 34 | * 35 | * @return void 36 | */ 37 | public function activate(Composer $composer, IOInterface $io) 38 | { 39 | $this->addInstallers( 40 | ...include __DIR__ . '/installers.php' 41 | ); 42 | } 43 | 44 | /** 45 | * Remove any hooks from Composer. 46 | * 47 | * @param Composer $composer 48 | * @param IOInterface $io 49 | * 50 | * @return void 51 | */ 52 | public function deactivate(Composer $composer, IOInterface $io) 53 | { 54 | } 55 | 56 | /** 57 | * Prepare the plugin to be uninstalled 58 | * 59 | * @param Composer $composer 60 | * @param IOInterface $io 61 | * 62 | * @return void 63 | */ 64 | public function uninstall(Composer $composer, IOInterface $io) 65 | { 66 | } 67 | 68 | /** 69 | * Add installers. 70 | * 71 | * @param InstallerInterface[] ...$installers 72 | * 73 | * @return void 74 | */ 75 | public function addInstallers(InstallerInterface ...$installers) 76 | { 77 | $this->installers = array_merge($this->installers, $installers); 78 | } 79 | 80 | /** 81 | * Run the installers. 82 | * 83 | * @return void 84 | */ 85 | public function install() 86 | { 87 | foreach ($this->installers as $installer) { 88 | $installer->install(); 89 | } 90 | } 91 | 92 | /** 93 | * Subscribe to post update and post install command. 94 | * 95 | * @return array 96 | */ 97 | public static function getSubscribedEvents(): array 98 | { 99 | return [ 100 | 'post-install-cmd' => [ 101 | 'install' 102 | ], 103 | 'post-update-cmd' => [ 104 | 'install' 105 | ] 106 | ]; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/ProjectTypeResolver.php: -------------------------------------------------------------------------------- 1 | 'magento2', 33 | 'magento-module' => 'magento1', 34 | 'magento2-project' => 'magento2', 35 | 'magento-project' => 'magento2', 36 | 'alumio-project' => 'alumio', 37 | 'laravel-project' => 'laravel', 38 | ]; 39 | 40 | /** 41 | * Constructor. 42 | * 43 | * @param Composer $composer 44 | * @param array|null $mapping 45 | */ 46 | public function __construct(Composer $composer, array $mapping = null) 47 | { 48 | $this->composer = $composer; 49 | $this->mapping = $mapping ?? $this->mapping; 50 | } 51 | 52 | /** 53 | * Get the type. 54 | * 55 | * @return string 56 | */ 57 | public function resolve(): string 58 | { 59 | $config = $this->composer->getConfig(); 60 | 61 | if ($config->has(static::COMPOSER_CONFIG_KEY)) { 62 | $configNode = $config->get(static::COMPOSER_CONFIG_KEY); 63 | if (isset($configNode[static::COMPOSER_CONFIG_TYPE_KEY])) { 64 | return $configNode[static::COMPOSER_CONFIG_TYPE_KEY]; 65 | } 66 | } 67 | 68 | $packageType = $this->composer->getPackage()->getType(); 69 | 70 | return array_key_exists($packageType, $this->mapping) 71 | ? $this->mapping[$packageType] 72 | : 'default'; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/installers.php: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | memory 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /templates/files/default/phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPCS 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/files/default/phpmd.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPMD 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/files/default/phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | excludes_analyse: 3 | # - %rootDir%/../../../path/to/exclude/* 4 | -------------------------------------------------------------------------------- /templates/files/default/phpunit_dist.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | tests 8 | 9 | 10 | 11 | 12 | src 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /templates/files/laravel/bitbucket-pipelines.yml: -------------------------------------------------------------------------------- 1 | image: srcoder/development-php:php74-fpm 2 | definitions: 3 | caches: 4 | vendor: vendor 5 | pipelines: 6 | default: 7 | - step: 8 | name: Testing suite 9 | caches: 10 | - composer 11 | - vendor 12 | script: 13 | - composer self-update 14 | - if [ -f "composer.lock" ]; then composer check-platform-reqs; fi 15 | - if [ -n "$COMPOSER_PRE_INSTALL_CALLBACK" ]; then eval $COMPOSER_PRE_INSTALL_CALLBACK; fi 16 | - composer install --dev --prefer-dist --no-scripts --no-progress --optimize-autoloader --no-interaction -vvv 17 | - composer show 18 | - composer exec -v grumphp run 19 | -------------------------------------------------------------------------------- /templates/files/laravel/dotgitignore: -------------------------------------------------------------------------------- 1 | # Do not commit project install files. 2 | /vendor 3 | /composer.lock -------------------------------------------------------------------------------- /templates/files/laravel/grumphp.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - resource: 'vendor/mediact/testing-suite/config/default/grumphp.yml' -------------------------------------------------------------------------------- /templates/files/laravel/pdepend.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | memory 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /templates/files/laravel/phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPCS 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/files/laravel/phpmd.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPMD 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/files/laravel/phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | excludes_analyse: 3 | # - %rootDir%/../../../path/to/exclude/* 4 | -------------------------------------------------------------------------------- /templates/files/magento1/.eslintignore: -------------------------------------------------------------------------------- 1 | *.min.js -------------------------------------------------------------------------------- /templates/files/magento1/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "jquery": true, 5 | "prototypejs": true 6 | }, 7 | "rules": { 8 | "consistent-return": 2, 9 | "eqeqeq": [2, "smart"], 10 | "guard-for-in": 2, 11 | "lines-around-comment": [ 12 | 2, 13 | { 14 | "beforeBlockComment": true 15 | } 16 | ], 17 | "max-len": [2, 120, 4], 18 | "max-nested-callbacks": [2, 3], 19 | "no-alert": 2, 20 | "no-array-constructor": 2, 21 | "no-caller": 2, 22 | "no-catch-shadow": 2, 23 | "no-else-return": 2, 24 | "no-eval": 2, 25 | "no-extend-native": 2, 26 | "no-extra-bind": 2, 27 | "no-floating-decimal": 2, 28 | "no-implied-eval": 2, 29 | "no-lone-blocks": 2, 30 | "no-lonely-if": 2, 31 | "no-loop-func": 2, 32 | "no-multi-str": 2, 33 | "no-new-object": 2, 34 | "no-proto": 2, 35 | "no-return-assign": 2, 36 | "no-self-compare": 2, 37 | "no-shadow": 2, 38 | "no-undef-init": 2, 39 | "no-unused-vars": [ 40 | 2, 41 | { 42 | "args": "after-used", 43 | "vars": "all" 44 | } 45 | ], 46 | "no-with": 2, 47 | "operator-assignment": [2, "always"], 48 | "radix": 2, 49 | "semi": [2, "always"], 50 | "semi-spacing": 2, 51 | "space-before-blocks": "error", 52 | "space-before-function-paren":"error", 53 | "func-style": [2, "expression"], 54 | "eol-last":"error" 55 | }, 56 | "globals": { 57 | "Translator": true, 58 | "Validation": true, 59 | "Varien": true, 60 | "Form": true, 61 | "Mage": true 62 | } 63 | } -------------------------------------------------------------------------------- /templates/files/magento1/bitbucket-pipelines.yml: -------------------------------------------------------------------------------- 1 | image: srcoder/development-php:php73-fpm 2 | definitions: 3 | caches: 4 | vendor: vendor 5 | pipelines: 6 | default: 7 | - step: 8 | name: Testing suite 9 | caches: 10 | - composer 11 | - vendor 12 | script: 13 | - composer self-update 14 | - if [ -f "composer.lock" ]; then composer check-platform-reqs; fi 15 | - if [ -n "$COMPOSER_PRE_INSTALL_CALLBACK" ]; then eval $COMPOSER_PRE_INSTALL_CALLBACK; fi 16 | - composer install --dev --prefer-dist --no-scripts --no-progress --optimize-autoloader --no-interaction -vvv 17 | - composer show 18 | - composer exec -v grumphp run 19 | -------------------------------------------------------------------------------- /templates/files/magento1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "eslint": "^4.19.1" 4 | } 5 | } -------------------------------------------------------------------------------- /templates/files/magento1/phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPCS 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/files/magento2/.eslintignore: -------------------------------------------------------------------------------- 1 | *.min.js -------------------------------------------------------------------------------- /templates/files/magento2/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "amd": true, 4 | "browser": true, 5 | "jasmine": true 6 | }, 7 | "rules": { 8 | "consistent-return": 2, 9 | "eqeqeq": [2, "smart"], 10 | "guard-for-in": 2, 11 | "lines-around-comment": [ 12 | 2, 13 | { 14 | "beforeBlockComment": true 15 | } 16 | ], 17 | "max-len": [2, 120, 4], 18 | "max-nested-callbacks": [2, 3], 19 | "no-alert": 2, 20 | "no-array-constructor": 2, 21 | "no-caller": 2, 22 | "no-catch-shadow": 2, 23 | "no-else-return": 2, 24 | "no-eval": 2, 25 | "no-extend-native": 2, 26 | "no-extra-bind": 2, 27 | "no-floating-decimal": 2, 28 | "no-implied-eval": 2, 29 | "no-lone-blocks": 2, 30 | "no-lonely-if": 2, 31 | "no-loop-func": 2, 32 | "no-multi-str": 2, 33 | "no-new-object": 2, 34 | "no-proto": 2, 35 | "no-return-assign": 2, 36 | "no-self-compare": 2, 37 | "no-shadow": 2, 38 | "no-undef-init": 2, 39 | "no-unused-vars": [ 40 | 2, 41 | { 42 | "args": "after-used", 43 | "vars": "all", 44 | "varsIgnorePattern": "^config$" 45 | } 46 | ], 47 | "no-with": 2, 48 | "operator-assignment": [2, "always"], 49 | "radix": 2, 50 | "semi": [2, "always"], 51 | "semi-spacing": 2, 52 | "space-before-blocks": "error", 53 | "space-before-function-paren":"error", 54 | "func-style": [2, "expression"], 55 | "eol-last":"error" 56 | } 57 | } -------------------------------------------------------------------------------- /templates/files/magento2/bitbucket-pipelines.yml: -------------------------------------------------------------------------------- 1 | image: srcoder/development-php:php74-fpm 2 | definitions: 3 | caches: 4 | vendor: vendor 5 | pipelines: 6 | default: 7 | - step: 8 | name: Testing suite 9 | caches: 10 | - composer 11 | - vendor 12 | script: 13 | - composer self-update --1 14 | - if [ -f "composer.lock" ]; then composer check-platform-reqs; fi 15 | - if [ -n "$COMPOSER_PRE_INSTALL_CALLBACK" ]; then eval $COMPOSER_PRE_INSTALL_CALLBACK; fi 16 | - composer install --dev --prefer-dist --no-scripts --no-progress --optimize-autoloader --no-interaction -vvv 17 | - composer show 18 | - composer exec -v grumphp run 19 | -------------------------------------------------------------------------------- /templates/files/magento2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "eslint": "^4.19.1" 4 | } 5 | } -------------------------------------------------------------------------------- /templates/files/magento2/phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPCS 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/files/magento2/phpmd.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | PHPMD 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /templates/files/magento2/phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | ignoreErrors: 3 | - '#(class|type) [A-z]*\\TestFramework#i' 4 | - '#(class|type) [A-z]*\\\S*Factory#i' 5 | -------------------------------------------------------------------------------- /templates/mapping/files: -------------------------------------------------------------------------------- 1 | {default/,}grumphp.yml 2 | {default/dot,.}gitignore 3 | {default/,}pdepend.xml 4 | {default/,}phpstan.neon 5 | {default/,}phpunit{_dist,}.xml 6 | -------------------------------------------------------------------------------- /templates/mapping/pipelines/alumio: -------------------------------------------------------------------------------- 1 | {alumio/,}bitbucket-pipelines.yml 2 | -------------------------------------------------------------------------------- /templates/mapping/pipelines/default: -------------------------------------------------------------------------------- 1 | {default/,}bitbucket-pipelines.yml -------------------------------------------------------------------------------- /templates/mapping/pipelines/magento1: -------------------------------------------------------------------------------- 1 | {magento1/,}bitbucket-pipelines.yml 2 | -------------------------------------------------------------------------------- /templates/mapping/pipelines/magento2: -------------------------------------------------------------------------------- 1 | {magento2/,}bitbucket-pipelines.yml -------------------------------------------------------------------------------- /templates/mapping/pipelines/mediact: -------------------------------------------------------------------------------- 1 | {pipelines-mediact/,}bitbucket-pipelines.yml -------------------------------------------------------------------------------- /templates/mapping/project/alumio: -------------------------------------------------------------------------------- 1 | {alumio/,}bitbucket-pipelines.yml 2 | -------------------------------------------------------------------------------- /templates/mapping/project/default: -------------------------------------------------------------------------------- 1 | {default/,}phpcs.xml 2 | {default/,}phpmd.xml 3 | -------------------------------------------------------------------------------- /templates/mapping/project/laravel: -------------------------------------------------------------------------------- 1 | {laravel/,}phpcs.xml 2 | {laravel/,}phpmd.xml 3 | {laravel/,}phpstan.neon 4 | -------------------------------------------------------------------------------- /templates/mapping/project/magento1: -------------------------------------------------------------------------------- 1 | {magento1/,}phpcs.xml 2 | {default/,}phpmd.xml 3 | {magento1/,}package.json 4 | {magento1/,}.eslintrc.json 5 | {magento1/,}.eslintignore 6 | -------------------------------------------------------------------------------- /templates/mapping/project/magento2: -------------------------------------------------------------------------------- 1 | {magento2/,}phpcs.xml 2 | {magento2/,}phpmd.xml 3 | {magento2/,}phpstan.neon 4 | {magento2/,}package.json 5 | {magento2/,}.eslintrc.json 6 | {magento2/,}.eslintignore 7 | --------------------------------------------------------------------------------