mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-17 23:08:33 +02:00
update with requested changes
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
@@ -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"
|
||||||
|
|||||||
@@ -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": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user