update with requested changes

This commit is contained in:
iampeterbanjo
2016-11-01 05:49:20 +00:00
parent 23fe5e01db
commit fc26dd926d
4 changed files with 8 additions and 16 deletions

View File

@@ -1,12 +1,10 @@
{ {
"plugins": [ "globals": {"chrome": true},
"mozilla"
],
"rules": { "rules": {
"no-set-state": "off" "no-set-state": "off"
}, },
"env": { "env": {
"browser": true,
"es6": true "es6": true
} }
} }

View File

@@ -2,6 +2,9 @@
## What it shows ## 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` ## How to use
* run `npm install` to install packages
* run `npm run lint` to use eslint

View File

@@ -5,13 +5,6 @@
"version": "1.0", "version": "1.0",
"homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/eslint-example", "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": { "browser_action": {
"default_icon": "icons/page-32.png", "default_icon": "icons/page-32.png",
"default_popup": "popup.html" "default_popup": "popup.html"

View File

@@ -5,12 +5,10 @@
"main": "index.js", "main": "index.js",
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"eslint": "^3.9.0", "eslint": "^3.9.0"
"eslint-plugin-mozilla": "^0.2.3"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"eslint": "./node_modules/.bin/eslint",
"lint": "eslint ." "lint": "eslint ."
}, },
"author": "", "author": "",