title: PHP CodeSniffer WordPress via Composer
body: <p>Is there a way to install <a href="https://github.com/squizlabs/PHP_CodeSniffer" rel="nofollow noreferrer">PHPCodeSniffer</a> and <a href="https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards" rel="nofollow noreferrer">WordPress Coding Standards for PHP_CodeSniffer</a> per project via <a href="https://getcomposer.org/" rel="nofollow noreferrer">Composer</a>?
  I've installed both as dev dependencies and set the installed path to WordPress Coding Standards in CodeSniffer.conf.
  Unfortunately phpcs can not resolve to the config file when I run the command in the terminal because it is looking in "vendor" folder for "vendor/squizlabs/php_codesniffer/CodeSniffer.conf"</p>
  
  <p>Here is my project setup:</p>
  
  <p>composer.json</p>
  
  <pre><code>{
      "require-dev": {
          "squizlabs/php_codesniffer": "^3.2",
          "wp-coding-standards/wpcs": "^0.14.0"
      }
  }
  </code></pre>
  
  <p>CodeSniffer.conf</p>
  
  <pre><code>&lt;?php
      $phpCodeSnifferConfig = array (
          'installed_paths' =&gt; 'vendor/wp-coding-standards/wpcs',
      )
  ?&gt;
  </code></pre>
  
  <p>Terminal</p>
  
  <pre><code>vendor/bin/phpcs -p THEME_NAME --standard=WordPress
  </code></pre>
  
  <p>"ERROR: the "WordPress" coding standard is not installed. The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz and PSR1"</p>