Bug 1314405 - Provide a readme for eslint-plugin-mozilla, and add some more details to its package.json. r?Mossop draft
authorMark Banner <standard8@mozilla.com>
Thu, 09 Mar 2017 11:45:04 +0000
changeset 495867 31a52ed1e0968a957d57f208442c39f46be86959
parent 495587 19289cc8bf6ffce3b2067fbe91aebea5a356d008
child 548481 6a9508eb0d58628e231ba572521207529fdf54f1
push id48450
push userbmo:standard8@mozilla.com
push dateThu, 09 Mar 2017 11:46:07 +0000
reviewersMossop
bugs1314405
milestone55.0a1
Bug 1314405 - Provide a readme for eslint-plugin-mozilla, and add some more details to its package.json. r?Mossop MozReview-Commit-ID: DdzWwWEFvf6
tools/lint/docs/linters/eslint-plugin-mozilla.rst
tools/lint/eslint/eslint-plugin-mozilla/README.md
tools/lint/eslint/eslint-plugin-mozilla/package.json
--- a/tools/lint/docs/linters/eslint-plugin-mozilla.rst
+++ b/tools/lint/docs/linters/eslint-plugin-mozilla.rst
@@ -229,19 +229,16 @@ Example
 +-------+-----------------------+
 | 2     | Error                 |
 +-------+-----------------------+
 
 Example configuration::
 
    "rules": {
      "mozilla/balanced-listeners": 2,
-     "mozilla/components-imports": 1,
-     "mozilla/import-globals-from": 1,
-     "mozilla/import-headjs-globals": 1,
      "mozilla/mark-test-function-used": 1,
      "mozilla/var-only-at-top-level": 1,
      "mozilla/no-cpows-in-tests": 1,
    }
 
 Running Tests
 =============
 
new file mode 100644
--- /dev/null
+++ b/tools/lint/eslint/eslint-plugin-mozilla/README.md
@@ -0,0 +1,56 @@
+# eslint-plugin-mozilla
+
+A collection of rules that help enforce JavaScript coding standard in the Mozilla project.
+
+These are primarily developed and used within the Firefox build system ([mozilla-central](https://hg.mozilla.org/mozilla-central/)), but are made available for other
+related projects to use as well.
+
+## Installation
+
+### Within mozilla-central:
+
+```
+$ ./mach eslint --setup
+```
+
+### Outside mozilla-central:
+
+Install ESLint [ESLint](http://eslint.org):
+
+```
+$ npm i eslint --save-dev
+```
+
+Next, install `eslint-plugin-mozilla`:
+
+```
+$ npm install eslint-plugin-mozilla --save-dev
+```
+
+## Documentation
+
+For details about the rules, please see the [gecko documentation page](http://gecko.readthedocs.io/en/latest/tools/lint/linters/eslint-plugin-mozilla.html).
+
+## Source Code
+
+The sources can be found at:
+
+* Code: https://dxr.mozilla.org/mozilla-central/source/tools/lint/eslint/eslint-plugin-mozilla
+* Documentation: https://dxr.mozilla.org/mozilla-central/source/tools/lint/docs/linters
+
+## Bugs
+
+Please file bugs in Bugzilla in the Lint component of the Testing product.
+
+* [Existing bugs](https://bugzilla.mozilla.org/buglist.cgi?resolution=---&query_format=advanced&component=Lint&product=Testing)
+* [New bugs](https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Lint)
+
+## Tests
+
+The tests can only be run from within mozilla-central. To run the tests:
+
+```
+./mach eslint --setup
+cd tools/lint/eslint/eslint-plugin-mozilla
+npm run test
+```
--- a/tools/lint/eslint/eslint-plugin-mozilla/package.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json
@@ -1,33 +1,37 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "0.2.27",
+  "version": "0.2.28",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],
   "bugs": {
-    "url": "https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=Developer%20Tools"
+    "url": "https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Lint"
   },
-  "homepage": "https://bugzilla.mozilla.org/show_bug.cgi?id=1203520",
+  "homepage": "http://gecko.readthedocs.io/en/latest/tools/lint/linters/eslint-plugin-mozilla.html",
+  "repository": {
+    "type": "hg",
+    "url": "https://hg.mozilla.org/mozilla-central/"
+  },
   "author": "Mike Ratcliffe",
   "main": "lib/index.js",
   "dependencies": {
     "escope": "^3.6.0",
     "espree": "^3.2.0",
     "estraverse": "^4.2.0",
     "globals": "^9.14.0",
     "ini-parser": "^0.0.2",
     "sax": "^1.1.4"
   },
   "engines": {
-    "node": ">=0.10.0"
+    "node": ">=4.2.0"
   },
   "scripts": {
     "test": "node tests/test-run-all.js"
   },
   "license": "MPL-2.0"
 }