Coder Social home page Coder Social logo

lintify's Introduction

lintify npm version

Browserify transform to abort bundling silly source files.

Installation

$ npm install lintify

Before

  1. someone creates CI job
  2. someone configures Checkstyle plugin for CI job
  3. someone configures ESLint to create Checkstyle format report
  4. developer saves silly source file
  5. developer commits silly source file to VCS
  6. developer pushes VCS commit to remote
  7. remote pushes notification to CI server
  8. CI server pulls in VCS changes
  9. CI server builds browserify bundle
  10. CI server passes bundle to ESLint
  11. ESLint generates Checkstyle report
  12. CI server aborts build
  13. CI server sends email to developer
  14. developer fixes issues
  15. developer commits potentially still silly source file to VCS
  16. back to step 6

After

  1. developer saves silly source file
  2. building browserify bundle is aborted
  3. developer fixes issues

Wait! Couldn't developer run ESLint herself?

That's what I used to think! It turns out, however, that the answer to that question is no.

Options

{
    errors: {
        head: function (file) {
            // log source file name
        },
        each: function (position, reason) {
            // log every error position in source file and reason
        },
        tail: function () {
            // log aborted bundle name
        },
        message: 'OH NOES LINT ERRORS EMITTED!!1!'
    }
}

License

MIT

lintify's People

Watchers

 avatar

Forkers

bbqbaron

lintify's Issues

File-Ignore Patterns

Ahoy ahoy; I'm including my templates via jstify and found myself needing to suppress linting of html files. I forked the repo and arrived at the solution in this commit, which was to add an ignorePaths option.

(I looked for some kind of existing jshint ignore option, and didn't see one.)

I'm curious whether you have any interest in a PR, either of this form of the solution or another form. Or maybe this is not the correct pattern and I should be using something like ternary-stream to prevent non-JS files from reaching lintify at all?

Very open to feedback; mostly just wondering if there's any value to my code or if I should just keep it to my fork (I'm kind of new to github etiquette).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.