From fc26dd926de8c2faa4268d3075fc957fbded2838 Mon Sep 17 00:00:00 2001 From: iampeterbanjo Date: Tue, 1 Nov 2016 05:49:20 +0000 Subject: [PATCH] update with requested changes --- eslint-example/.eslintrc.json | 6 ++---- eslint-example/README.md | 7 +++++-- eslint-example/manifest.json | 7 ------- eslint-example/package.json | 4 +--- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/eslint-example/.eslintrc.json b/eslint-example/.eslintrc.json index 8c8f0a2..2415576 100644 --- a/eslint-example/.eslintrc.json +++ b/eslint-example/.eslintrc.json @@ -1,12 +1,10 @@ { - "plugins": [ - "mozilla" - ], - + "globals": {"chrome": true}, "rules": { "no-set-state": "off" }, "env": { + "browser": true, "es6": true } } \ No newline at end of file diff --git a/eslint-example/README.md b/eslint-example/README.md index 95a448d..eb0396f 100644 --- a/eslint-example/README.md +++ b/eslint-example/README.md @@ -2,6 +2,9 @@ ## What it shows -A project configured to use the [Mozilla ESlint configuration](https://www.npmjs.com/package/eslint-plugin-mozilla) +A project configured to use the [Mozilla ESlint configuration](https://www.npmjs.com/package/eslint-plugin-mozilla). By using a linter on your extension source code you can be sure that you will only be writing JavaScript that is compatible with Firefox. -* to run locally configured eslint use `npm run lint` \ No newline at end of file +## How to use + +* run `npm install` to install packages +* run `npm run lint` to use eslint \ No newline at end of file diff --git a/eslint-example/manifest.json b/eslint-example/manifest.json index 833787d..21dfebf 100644 --- a/eslint-example/manifest.json +++ b/eslint-example/manifest.json @@ -5,13 +5,6 @@ "version": "1.0", "homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/eslint-example", - "applications": { - "gecko": { - "id": "eslint-example@mozilla.org", - "strict_min_version": "49.0" - } - }, - "browser_action": { "default_icon": "icons/page-32.png", "default_popup": "popup.html" diff --git a/eslint-example/package.json b/eslint-example/package.json index 77e5f4f..314d61e 100644 --- a/eslint-example/package.json +++ b/eslint-example/package.json @@ -5,12 +5,10 @@ "main": "index.js", "dependencies": {}, "devDependencies": { - "eslint": "^3.9.0", - "eslint-plugin-mozilla": "^0.2.3" + "eslint": "^3.9.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "eslint": "./node_modules/.bin/eslint", "lint": "eslint ." }, "author": "",