Files
2014-07-17 01:52:22 +08:00

124 lines
6.3 KiB
JSON

{
"name": "jslint",
"description": "The JavaScript Code Quality Tool",
"homepage": "https://github.com/reid/node-jslint",
"keywords": [
"lint"
],
"version": "0.6.1",
"author": {
"name": "Reid Burke",
"email": "me@reidburke.com"
},
"contributors": [
{
"name": "Douglas Crockford",
"email": "douglas@crockford.com"
},
{
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
},
{
"name": "Adam Moore"
},
{
"name": "Luke Smith",
"email": "lsmith@yahoo-inc.com"
},
{
"name": "Anders Conbere",
"email": "aconbere@gmail.com"
},
{
"name": "Ryuichi OKUMURA",
"email": "okuryu@okuryu.com"
},
{
"name": "Sam Mikes",
"email": "smikes@cubane.com"
},
{
"name": "Dylan Lloyd"
},
{
"name": "Andreas Hindborg"
},
{
"name": "Andrew Pennebaker"
},
{
"name": "Bnaya"
},
{
"name": "Maximilian Antoni",
"email": "mail@maxantoni.de"
},
{
"name": "Vasil Velichkov"
},
{
"name": "Rasmus Paetau"
}
],
"bin": {
"jslint": "./bin/jslint.js"
},
"main": "./lib/nodelint.js",
"dependencies": {
"exit": "^0.1.2",
"glob": "^4.0.4",
"nopt": "^3.0.0"
},
"devDependencies": {
"ronn": "^0.4.0",
"istanbul": "^0.3.0",
"mocha": "^1.20.0",
"fs.extra": "^1.2.1"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"man",
"doc",
"lib",
"bin",
"jslintrc.example",
"Makefile"
],
"directories": {
"lib": "./lib",
"man": "./man",
"doc": "./doc"
},
"man": [
"./man/jslint.1"
],
"repository": {
"type": "git",
"url": "git://github.com/reid/node-jslint.git"
},
"bugs": {
"url": "https://github.com/reid/node-jslint/issues"
},
"licenses": [
{
"type": "Modified MIT / BSD",
"url": "https://github.com/reid/node-jslint/blob/master/LICENSE"
}
],
"scripts": {
"test": "make test",
"prepublish": "make prepublish"
},
"readme": "## node-jslint\n\nEasily use [JSLint][] from the command line.\n\n jslint bin/jslint.js\n\n## What's New\n\nAdded latest jslint, 2014-04-21.\n\nVersion 0.5.1 fixes a regression which crashes jslint when more than\nmaxerr errors are in a single file. Thanks to Vasil Velichkov\n(@velichkov) for pointing this out.\n\nVersion 0.5.0 reorganizes the loading interface, making it easier for\nother projects to use node-jslint to load a specific jslint edition.\n\nVersion 0.4.0 exposes a stream interface to jslint.\n\nVersion 0.3.4 supports globbing with * and ** expressions.\n\nVersions 0.2+ provide multiple editions of jslint to\naddress backwards and forwards compatibility.\n\n## Use the command-line client\n\n### Use the default jslint\n\n jslint lib/color.js\n\n### Always use the latest jslint\n\n jslint --edition=latest lib/color.js\n\n### Use a specific edition\n\nFor example, edition 2013-02-03 which shipped with node-jslint 0.1.9:\n\n jslint --edition=2013-02-03 lib/color.js\n\n## Use node-jslint programmatically\n\n### Streams interface\n\nAs of node-jslint 0.4.0, a streams interface is exposed. You can use it in client code like this:\n\nInstall as a dependency:\n\n $ npm install --save jslint\n\nPull it into your code with require:\n\n var LintStream = require('jslint').LintStream;\n\nCreate and configure the stream linter:\n\n var options = {\n \"edition\": latest,\n \"length\": 100\n },\n l = new LintStream(options);\n\nSend files to the linter:\n\n var fileName, fileContents;\n l.write({file: fileName, body: fileContents});\n\nReceive lint from the linter:\n\n l.on('data', function (chunk, encoding, callback) {\n // chunk is an object\n\n // chunk.file is whatever you supplied to write (see above)\n assert.deepEqual(chunk.file, fileName);\n\n // chunk.linted is an object holding the result from running JSLint\n // chunk.linted.ok is the boolean return code from JSLINT()\n // chunk.linted.errors is the array of errors, etc.\n // see JSLINT for the complete contents of the object\n\n callback();\n });\n\nYou can only pass options to the LintStream when creating it. The `edition` option can be\nused to select different editions of JSLint.\n\nThe LintStream is in object mode (objectMode: true). It expects an\nobject with two properties: `file` and `body`. The `file` property\ncan be used to pass metadata along with the file. The `body` property\ncontains the file to be linted; it can be either a string or a Buffer.\n\nThe LintStream emits `'data'` events containing an object with two properties.\nThe `file` property is copied from the `file` property that is passed in. The\n`linted` property contains the results of running JSLINT.\n\n### Simple interface\n\nThe simple interface provides an edition-aware loader. This can be used as a frontend to\nnode-jslint's collection of editions of the JSLINT code.\n\n var node_jslint = require('jslint'),\n JSLINT = node_jslint.load(edition);\n\nThis exposes the same loading interface used in node-jslint, so it supports the special\nedition names `default` and `latest` as well as date-based edition names such as `2013-08-26`\n\nAs of version 0.5.0, the `load` function also accepts filenames. To be recognized as a filename,\nthe argument to load must contain a path-separator character (`/` or `\\`) or end with the extension\n`.js`.\n\n\n## Usage examples\n\nMultiple files\n\n jslint lib/color.js lib/reporter.js\n\nAll JSLint options supported\n\n jslint --white --vars --regexp lib/color.js\n\nDefaults to true, but you can specify false\n\n jslint --bitwise false lib/color.js\n\nPass arrays\n\n jslint --predef $ --predef Backbone lib/color.js\n\nJSLint your entire project\n\n jslint '**/*.js'\n\nUsing JSLint with a config file\n\nStart with the included jslint.conf.example file and customize your options\nper project or copy it to $HOME/.jslint.conf to apply your setting globally\n\n## License\n\nSee LICENSE file.\n\n[JSLint]: http://jslint.com/\n",
"readmeFilename": "README.md",
"_id": "jslint@0.6.1",
"dist": {
"shasum": "4730cf21a51c53239274e2e071e27925e18bd83d"
},
"_from": "jslint@~0.6.1",
"_resolved": "https://registry.npmjs.org/jslint/-/jslint-0.6.1.tgz"
}