UNPKG

canonical

Version:

Canonical code style linter and formatter for JavaScript, SCSS and CSS.

152 lines (151 loc) 10.9 kB
{ "_args": [ [ "eslint@https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", "/Users/gajus/Documents/dev/canonical-code-style/canonical" ] ], "_from": "eslint@>=1.10.3 <2.0.0", "_id": "eslint@1.10.3", "_inCache": true, "_location": "/eslint", "_phantomChildren": { "argparse": "1.0.3" }, "_requested": { "name": "eslint", "raw": "eslint@https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", "rawSpec": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", "scope": null, "spec": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", "type": "remote" }, "_requiredBy": [ "/", "/css-lint" ], "_resolved": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", "_shasum": "fb19a91b13c158082bbca294b17d979bc8353a0a", "_shrinkwrap": null, "_spec": "eslint@https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz", "_where": "/Users/gajus/Documents/dev/canonical-code-style/canonical", "author": { "email": "nicholas+npm@nczconsulting.com", "name": "Nicholas C. Zakas" }, "bin": { "eslint": "./bin/eslint.js" }, "bugs": { "url": "https://github.com/eslint/eslint/issues/" }, "dependencies": { "chalk": "^1.0.0", "concat-stream": "^1.4.6", "debug": "^2.1.1", "doctrine": "^0.7.1", "escape-string-regexp": "^1.0.2", "escope": "^3.3.0", "espree": "^2.2.4", "estraverse": "^4.1.1", "estraverse-fb": "^1.3.1", "esutils": "^2.0.2", "file-entry-cache": "^1.1.1", "glob": "^5.0.14", "globals": "^8.11.0", "handlebars": "^4.0.0", "inquirer": "^0.11.0", "is-my-json-valid": "^2.10.0", "is-resolvable": "^1.0.0", "js-yaml": "3.4.5", "json-stable-stringify": "^1.0.0", "lodash.clonedeep": "^3.0.1", "lodash.merge": "^3.3.2", "lodash.omit": "^3.1.0", "minimatch": "^3.0.0", "mkdirp": "^0.5.0", "object-assign": "^4.0.1", "optionator": "^0.6.0", "path-is-absolute": "^1.0.0", "path-is-inside": "^1.0.1", "shelljs": "^0.5.3", "strip-json-comments": "~1.0.1", "text-table": "~0.2.0", "user-home": "^2.0.0", "xml-escape": "~1.0.0" }, "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "beefy": "^1.0.0", "brfs": "0.0.9", "browserify": "^12.0.1", "chai": "^3.4.0", "cheerio": "^0.19.0", "coveralls": "2.11.4", "dateformat": "^1.0.8", "ejs": "^2.3.3", "esprima": "^2.4.1", "esprima-fb": "^15001.1001.0-dev-harmony-fb", "gh-got": "^2.2.0", "istanbul": "^0.4.0", "jsdoc": "^3.3.0-beta1", "jsonlint": "^1.6.2", "leche": "^2.1.1", "linefix": "^0.1.1", "load-perf": "^0.2.0", "markdownlint": "^0.0.8", "mocha": "^2.1.0", "mocha-phantomjs": "4.0.1", "npm-license": "^0.3.1", "phantomjs": "1.9.18", "proxyquire": "^1.0.0", "rewire": "^2.3.4", "semver": "^5.0.3", "shelljs-nodecli": "~0.1.0", "sinon": "1.17.2", "through": "^2.3.6" }, "engines": { "node": ">=0.10" }, "files": [ "LICENSE", "README.md", "bin", "conf", "lib" ], "homepage": "http://eslint.org", "keywords": [ "ast", "ecmascript", "espree", "javascript", "lint" ], "license": "MIT", "main": "./lib/api.js", "name": "eslint", "optionalDependencies": {}, "readme": "[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Downloads][downloads-image]][downloads-url]\n[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=282608)](https://www.bountysource.com/trackers/282608-eslint?utm_source=282608&utm_medium=shield&utm_campaign=TRACKER_BADGE)\n[![Join the chat at https://gitter.im/eslint/eslint](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/eslint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n# ESLint\n\n[Website](http://eslint.org) | [Configuring](http://eslint.org/docs/user-guide/configuring) | [Rules](http://eslint.org/docs/rules/) | [Contributing](http://eslint.org/docs/developer-guide/contributing) | [Twitter](https://twitter.com/geteslint) | [Mailing List](https://groups.google.com/group/eslint)\n\nESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:\n\n* ESLint uses [Espree](https://github.com/eslint/espree) for JavaScript parsing.\n* ESLint uses an AST to evaluate patterns in code.\n* ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.\n\n## Installation\n\nYou can install ESLint using npm:\n\n npm install -g eslint\n\n## Usage\n\nIf it's your first time using ESLint, you should set up a config file using `--init`:\n\n eslint --init\n\nAfter that, you can run ESLint on any JavaScript file:\n\n eslint test.js test2.js\n\n## Configuration\n\nAfter running `eslint --init`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this:\n\n```json\n{\n \"rules\": {\n \"semi\": [2, \"always\"],\n \"quotes\": [2, \"double\"]\n }\n}\n```\n\nThe names `\"semi\"` and `\"quotes\"` are the names of [rules](http://eslint.org/docs/rules) in ESLint. The number is the error level of the rule and can be one of the three values:\n\n* `0` - turn the rule off\n* `1` - turn the rule on as a warning (doesn't affect exit code)\n* `2` - turn the rule on as an error (exit code will be 1)\n\nThe three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](http://eslint.org/docs/user-guide/configuring)).\n\n## Sponsors\n\n* Development is sponsored by [Box](https://box.com)\n\n## Team\n\nThese folks keep the project moving and are resources for help:\n\n* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead\n* Ilya Volodin ([@ilyavolodin](https://github.com/ilyavolodin)) - reviewer\n* Brandon Mills ([@btmills](https://github.com/btmills)) - reviewer\n* Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps)) - reviewer\n* Mathias Schreck ([@lo1tuma](https://github.com/lo1tuma)) - committer\n* Jamund Ferguson ([@xjamundx](https://github.com/xjamundx)) - committer\n* Ian VanSchooten ([@ianvs](https://github.com/ianvs)) - committer\n* Toru Nagashima ([@mysticatea](https://github.com/mysticatea)) - committer\n* Burak Yiğit Kaya ([@byk](https://github.com/byk)) - committer\n* Alberto Rodríguez ([@alberto](https://github.com/alberto)) - committer\n\n## Releases\n\nWe have scheduled releases every two weeks on Friday or Saturday.\n\n## Frequently Asked Questions\n\n### Why don't you like JSHint???\n\nI do like JSHint. And I like Anton and Rick. Neither of those were deciding factors in creating this tool. The fact is that I've had a dire need for a JavaScript tool with pluggable linting rules. I had hoped JSHint would be able to do this, however after chatting with Anton, I found that the planned plugin infrastructure wasn't going to suit my purpose.\n\n### I'm not giving up JSHint for this!\n\nThat's not really a question, but I got it. I'm not trying to convince you that ESLint is better than JSHint. The only thing I know is that ESLint is better than JSHint for what I'm doing. In the off chance you're doing something similar, it might be better for you. Otherwise, keep using JSHint, I'm certainly not going to tell you to stop using it.\n\n### How does ESLint performance compare to JSHint and JSCS?\n\nESLint is slower than JSHint, usually 2-3x slower on a single file. This is because ESLint uses Espree to construct an AST before it can evaluate your code whereas JSHint evaluates your code as it's being parsed. The speed is also based on the number of rules you enable; the more rules you enable, the slower the process.\n\nDespite being slower, we believe that ESLint is fast enough to replace JSHint without causing significant pain.\n\nESLint is faster than JSCS, as ESLint uses a single-pass traversal for analysis whereas JSCS using a querying model.\n\nIf you are using both JSHint and JSCS on your files, then using just ESLint will be faster.\n\n### Is ESLint just linting or does it also check style?\n\nESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use it for both.\n\n### What about ECMAScript 6 support?\n\nESLint has full support for ECMAScript 6. By default, this support is off. You can enable ECMAScript 6 support through [configuration](http://eslint.org/docs/user-guide/configuring).\n\n### Does ESLint support JSX?\n\nYes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](http://eslint.org/docs/user-guide/configuring).). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.\n\n### What about ECMAScript 7/2016 and experimental features?\n\nESLint doesn't natively support experimental ECMAScript language features. You can use [babel-eslint](https://github.com/babel/babel-eslint) to use any option available in Babel.\n\n### Where to ask for help?\n\nJoin our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://gitter.im/eslint/eslint)\n\n\n[npm-image]: https://img.shields.io/npm/v/eslint.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/eslint\n[travis-image]: https://img.shields.io/travis/eslint/eslint/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/eslint/eslint\n[coveralls-image]: https://img.shields.io/coveralls/eslint/eslint/master.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/eslint/eslint?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/eslint.svg?style=flat-square\n[downloads-url]: https://www.npmjs.com/package/eslint\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/eslint/eslint.git" }, "scripts": { "browserify": "node Makefile.js browserify", "check-commit": "node Makefile.js checkGitCommit", "coveralls": "cat ./coverage/lcov.info | coveralls", "docs": "node Makefile.js docs", "gensite": "node Makefile.js gensite", "lint": "node Makefile.js lint", "major": "node Makefile.js major", "minor": "node Makefile.js minor", "patch": "node Makefile.js patch", "perf": "node Makefile.js perf", "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree", "test": "node Makefile.js test" }, "version": "1.10.3" }