0.8.0 • Published 9 years ago

jshint-groups v0.8.0

Weekly downloads
57
License
-
Repository
github
Last release
9 years ago

jshint-groups Build Status

jshint-groups is a wrapper for JSHint which allows check different files by using different options.

Installation

$ npm install -g jshint-groups

Note: jshint declares as peer dependency and can be update separately.

Usage

Find and check all files described in config:

$ jshint-groups

Check specific files:

$ jshint-groups file1.js file2.js

jshint-groups automatically detects jshint options for each file or ignore it. It can be useful for pre-commit hook.

Configuration file

Configuration file is a js file (nodejs module). By default it has .jshint-groups.js name. Example:

module.exports = {
    options: {
        undef: true,
        unused: true
    },
    groups: {
        client: {
            options: {
                browser: true
            },
            includes: [
                'client/**/*.js'
            ],
            excludes: [
                'client/vendor/**'
            ]
        },

        server: {
            options: {
                node: true
            },
            includes: [
                'server/**'
            ]
        }
    }
};

Properties

  • options Common jshint options. Please see the jshint documentation for more details.
  • groups Each group specifies fileset for validation.
    • options JSHint options for group. This options extends common options.
    • includes List of glob patterns. Please see the minimatch documentation for more details.
    • excludes List of glob patterns to filter include results.

All properties are optional.

License

MIT License.

0.8.0

9 years ago

0.7.0

9 years ago

0.6.2

10 years ago

0.6.0

10 years ago

0.5.5

10 years ago

0.5.4

10 years ago

0.5.3

11 years ago

0.5.2

11 years ago

0.6.1

11 years ago

0.5.1

11 years ago

0.5.0

11 years ago

0.4.0

11 years ago

0.3.0

11 years ago

0.2.2

11 years ago

0.2.1

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.10

11 years ago