2017 © Pedro Peláez
 

library phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

image

chromatix/phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

  • Thursday, November 23, 2017
  • by chromatix
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1,064 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 23 % Grown

The README.md

phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context., (*1)

This config is still in development. If you have suggestions for improvement or if you disagree with anything this config makes you do, feel free to file an issue. If it is not specific to this config, please file upstream (such as at phpcs-config-chromatix)., (*2)

Installation

Install globally to use on any project:, (*3)

composer global install chromatix/phpcs-config-chromatix-no-wordpress

Install locally to one project:, (*4)

composer install chromatix/phpcs-config-chromatix-no-wordpress

You'll also need to have phpcs installed in the same manner, and set your phpcs installed_paths like follows:, (*5)

vendor/bin/phpcs --config-set installed_paths ../../chromatix,../../wp-coding-standards/wpcs

It's probably ideal to do this in a post-install-cmd script in your composer.json; see this package's composer.json for an example of a cross-platform way to do so (it might look a bit complicated, but unfortunately is required... at least in our testing so far, anyway!)., (*6)

Usage

Add this to your phpcs.xml file:, (*7)

<?xml version="1.0"?>
<ruleset>
  <rule ref="phpcs-config-chromatix-no-wordpress"/>
</ruleset>

Then:, (*8)

  • Using globally?, (*9)

    Run phpcs *.php, (*10)

  • Using locally?, (*11)

    Run vendor/bin/phpcs *.php, (*12)

    Alternatively, you'll probably find it useful to add a script to your composer.json:, (*13)

    "scripts": { "lint": "find . -type d \( -name '.git' -o -name 'vendor' -o -name 'node_modules' \) -prune -o -type f -name '*.php' -print | xargs vendor/bin/phpcs" }, (*14)

    Then you can just run composer lint., (*15)

See also

License

MIT., (*16)

The Versions

23/11 2017

dev-master

9999999-dev https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

23/11 2017

v0.0.4

0.0.4.0 https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

03/11 2017

v0.0.3

0.0.3.0 https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

02/11 2017

v0.0.2

0.0.2.0 https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

02/11 2017

v0.0.1

0.0.1.0 https://github.com/ChromatixAU/phpcs-config-chromatix-no-wordpress

Like phpcs-config-chromatix, but without the rules for things that can only be used in the WordPress context.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix