grunt-jscs-checker

WebJar for grunt-jscs-checker

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

grunt-jscs-checker
Last Version

Last Version

0.8.1
Release Date

Release Date

Type

Type

jar
Description

Description

grunt-jscs-checker
WebJar for grunt-jscs-checker
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jscs-dev/grunt-jscs

Download grunt-jscs-checker

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/grunt-jscs-checker/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>grunt-jscs-checker</artifactId>
    <version>0.8.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/grunt-jscs-checker/
implementation 'org.webjars.npm:grunt-jscs-checker:0.8.1'
// https://jarcasting.com/artifacts/org.webjars.npm/grunt-jscs-checker/
implementation ("org.webjars.npm:grunt-jscs-checker:0.8.1")
'org.webjars.npm:grunt-jscs-checker:jar:0.8.1'
<dependency org="org.webjars.npm" name="grunt-jscs-checker" rev="0.8.1">
  <artifact name="grunt-jscs-checker" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='grunt-jscs-checker', version='0.8.1')
)
libraryDependencies += "org.webjars.npm" % "grunt-jscs-checker" % "0.8.1"
[org.webjars.npm/grunt-jscs-checker "0.8.1"]

Dependencies

compile (4)

Group / Artifact Type Version
org.webjars.npm : hooker jar [0.2.3,0.3)
org.webjars.npm : jscs jar [1.7.2,1.8)
org.webjars.npm : lodash jar [2.4.1,2.5)
org.webjars.npm : vow jar [0.4.1,0.5)

Project Modules

There are no modules declared in this project.

grunt-jscs

Task for checking JavaScript Code Style with jscs.

Build Status Dependency Status devDependency Status NPM version

Getting started

This plugin requires Grunt ~0.4.2

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-jscs --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks("grunt-jscs");

jscs task

Run this task with the grunt jscs command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Options

Any specified option will be passed through directly to JSCS, plus this plugin has additional options:

config

Type: String, Boolean Default value: true

Defines how to externally load a JSCS configuration via the JSCS config loader. The following is the behavior of this option:

  • If set to a file path, then this file will be used;
  • If set to true, JSCS will use its default config loading behavior;
  • If set to true or to a file path with JSCS options specified in the grunt task, then they will be merged.
jscs: {
    src: "path/to/files/*.js",
    options: {
        config: ".jscsrc",
        esnext: true, // If you use ES6 http://jscs.info/overview.html#esnext
        verbose: true, // If you need output with rule names http://jscs.info/overview.html#verbose
        fix: true, // Autofix code style violations when possible.
        requireCurlyBraces: [ "if" ]
    }
}

force

Type: Boolean Default value: false

Set force to true to report JSCS errors but not fail the task.

reporter

Type: String Default value: null

Allows you to modify the output. By default it will use a built-in grunt reporter. Set the path to your own custom reporter or to one of the built-in JSCS reporters.

reporterOutput

Type: String Default value: null

Specify a filepath to output the results of a reporter. If reporterOutput is specified then all output will be written to the given filepath instead of printed to stdout.

Usage examples

jscs: {
    main: [ "path/to/files/*.js" ],
    secondary: {
        options: {
            config: ".jscs-secondary",
        },
        files: {
            src: [ "path/to/more/files/**/*.js", "my-plugin.js" ]
        }
    },
    ternary: {
        options: {
            requireCurlyBraces: [ "if" ]
        },
        files: {
            src: "happy-hippo.js"
        }
    }
}

Release History

See the releases page.

org.webjars.npm

Versions

Version
0.8.1