Is there a NPM Gulp module that can not only lint
my PHP code, but has a config/rules file that would allow me to specify certain things such as:
- Classes open with
{
on next line - All methods must have correct DocType
- etc.
I use an ESLinter for my JS code that works really nice. It has a .eslintrc
file where I specify all my rules. Kinda like this:
{
"rules": {
"indent": [ 2, 2, {"SwitchCase": 1} ],
"linebreak-style": [ 2, "unix" ],
"eol-last": 1,
"no-multi-spaces": 1,
"quotes": [ 1, "single", "avoid-escape" ],
"semi": [ 2, "always" ],
"array-bracket-spacing": [ 1, "always", { "objectsInArrays": false } ]
}
}