All Projects → wayneashleyberry → Phplint

wayneashleyberry / Phplint

Licence: mit
Lightning fast concurrent PHP linter for Node.js, Grunt & Gulp! ⚡️

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Phplint

feweekly
⭐ 前端周刊,让你在前端领域跟上时代的脚步,深度和广度不断精进
Stars: ✭ 34 (-45.16%)
Mutual labels:  gulp, grunt
actions-js-build
GitHub Actions for running Javascript build tools and committing file changes
Stars: ✭ 46 (-25.81%)
Mutual labels:  gulp, grunt
Barekit
A bare minimum responsive framework
Stars: ✭ 201 (+224.19%)
Mutual labels:  gulp, grunt
Grunt2gulp.js
Converts Grunt task files, gruntfile.js, to Gulp files.
Stars: ✭ 64 (+3.23%)
Mutual labels:  gulp, grunt
generator-veams
Scaffold modern frontend web apps or web pages with a static site generator (Assemble or Mangony), Grunt and/or Gulp, Sass and Bower. Use modern frameworks like Bourbon, Bootstrap or Foundation and structure your JavaScript with ES Harmony support.
Stars: ✭ 45 (-27.42%)
Mutual labels:  gulp, grunt
jscrambler
Monorepo of Jscrambler's Javascript Client and Integrations
Stars: ✭ 118 (+90.32%)
Mutual labels:  gulp, grunt
Frontend-StarterKit
Frontend StarterKit - [Gulp 4, Pug, SCSS, ES6+]
Stars: ✭ 13 (-79.03%)
Mutual labels:  gulp, linter
Assemble
Community
Stars: ✭ 3,995 (+6343.55%)
Mutual labels:  gulp, grunt
docker-npm
npm, yarn, node, npx, bower, grunt, gulp, generate-md - build and dev tools.
Stars: ✭ 53 (-14.52%)
Mutual labels:  gulp, grunt
generator-sf
Yeoman generator that scaffolds out a Symfony PHP app including Browsersync, various CSS preprocessors, jspm, webpack, browserify and Service Worker
Stars: ✭ 14 (-77.42%)
Mutual labels:  gulp, grunt
n-asset-macro
Asset macro for Latte and Nette Framework for assets cache busting.
Stars: ✭ 14 (-77.42%)
Mutual labels:  gulp, grunt
Docker Compose Nodejs Examples
Finally some real world examples on getting started with Docker Compose and Nodejs
Stars: ✭ 944 (+1422.58%)
Mutual labels:  gulp, grunt
Express Mvc Boilerplate
A simple mvc boilerplate for express.js (gulp + expressjs + nodemon + browser-sync)
Stars: ✭ 46 (-25.81%)
Mutual labels:  gulp
Clj Kondo
A linter for Clojure code that sparks joy.
Stars: ✭ 1,083 (+1646.77%)
Mutual labels:  linter
Grunt Frontend Workflow
Structured, modular and test-driven front-end development and build workflow with Grunt task runner. Includes boilerplate code for Backbone with single/multipage RequireJS setup, and a RESTful API for prototyping.
Stars: ✭ 44 (-29.03%)
Mutual labels:  grunt
Validator
Nu Html Checker – Helps you catch problems in your HTML/CSS/SVG
Stars: ✭ 1,024 (+1551.61%)
Mutual labels:  linter
Livro Sem Apego
📚 Um site de doação de livros, sem fins lucrativos! o/
Stars: ✭ 58 (-6.45%)
Mutual labels:  gulp
Gulp Json Editor
A gulp plugin to edit JSON objects
Stars: ✭ 55 (-11.29%)
Mutual labels:  gulp
Mathjax Grunt Cleaner
A grunt file to reduce the footprint of a MathJax installation
Stars: ✭ 42 (-32.26%)
Mutual labels:  grunt
Gulp Bootlint
A gulp wrapper for Bootlint, the HTML linter for Bootstrap projects.
Stars: ✭ 42 (-32.26%)
Mutual labels:  gulp

phplint

phplint is a node wrapper around the native php linter that allows for parallel linting and integration with build systems like Grunt, Gulp and more.

Build Status npm styled with prettier

Usage

CLI

$ npm i -g phplint
$ phplint '**/*.php'

Paths and filenames are parsed using globby, so the following would work as well:

$ phplint '**/*.php' '!vendor/**'

Node

var phplint = require("phplint").lint;

phplint(["src/**/*.php"], function (err, stdout, stderr) {
  if (err) throw new Error(err);

  process.stdout.write(stdout);
  process.stderr.write(stderr);

  // success!
});

NPM

{
  "scripts": {
    "pretest": "phplint 'src/**/*.php'"
  },
  "devDependencies": {
    "phplint": "~1.0.0"
  }
}
$ npm test

Grunt

Configure cache directories

This module uses the cache-swap module to cache already linted files. You can configure the cache directories via the cacheDirName and the tmpDir options. Both options will be passed to the CacheSwap instance when created.

module.exports = function (grunt) {
  require("phplint").gruntPlugin(grunt);

  grunt.initConfig({
    phplint: {
      options: {
        limit: 10,
        phpCmd: "/home/scripts/php", // Defaults to php
        stdout: true,
        stderr: true,
        useCache: true, // Defaults to false
        tmpDir: "/custom/root/folder", // Defaults to os.tmpDir()
        cacheDirName: "custom/subfolder", // Defaults to php-lint
      },
      files: "src/**/*.php",
    },
  });

  grunt.registerTask("test", ["phplint"]);
};
$ grunt test

Gulp

The same options that can be used in Grunt can be used in Gulp too.

var gulp = require("gulp");
var phplint = require("phplint").lint;

gulp.task("phplint", function (cb) {
  phplint(["src/**/*.php"], { limit: 10 }, function (err, stdout, stderr) {
    if (err) {
      cb(err);
      process.exit(1);
    }
    cb();
  });
});

gulp.task("test", ["phplint"]);
$ gulp test

Related

License

MIT © Wayne Ashley Berry

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].