зеркало из https://github.com/mozilla/pulse.git
Adds eslint; fixes linting errors.
This commit is contained in:
Родитель
721b032b25
Коммит
793bc581a1
|
@ -0,0 +1,2 @@
|
|||
build
|
||||
dist
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"browser": false
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"quotes": ["error", "double"]
|
||||
}
|
||||
}
|
|
@ -48,7 +48,13 @@ While the WebExtension:
|
|||
|
||||
## Style
|
||||
|
||||
Pulse follows the default formatting recommendations provided by [`prettier`](https://github.com/jlongster/prettier). To automatically clean up the working tree, run:
|
||||
Pulse follows the default formatting recommendations provided by [`prettier`](https://github.com/jlongster/prettier). To lint the source tree:
|
||||
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
To automatically clean up the working tree, run:
|
||||
|
||||
```sh
|
||||
npm run prettier
|
||||
|
|
12
package.json
12
package.json
|
@ -14,6 +14,7 @@
|
|||
"babel-preset-latest": "^6.16.0",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"css-loader": "^0.26.1",
|
||||
"eslint": "^3.13.1",
|
||||
"jpm": "^1.2.2",
|
||||
"node-sass": "^4.1.1",
|
||||
"prettier": "0.0.9",
|
||||
|
@ -26,9 +27,14 @@
|
|||
"icon": {
|
||||
"64": "webextension/icons/pulse-64.png"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mozilla/pulse.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./node_modules/webpack/bin/webpack.js",
|
||||
"watch": "./node_modules/webpack/bin/webpack.js --watch",
|
||||
"prettier": "./node_modules/prettier/bin/prettier.js --write src/**/*.js webpack.config.js"
|
||||
"build": "webpack",
|
||||
"watch": "webpack",
|
||||
"prettier": "prettier --write src/**/*.js webpack.config.js",
|
||||
"lint": "eslint ."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@ logger.log("SDK startup");
|
|||
|
||||
webext.startup().then(({ browser }) => {
|
||||
logger.log("WebExtension startup");
|
||||
browser.runtime.onConnect.addListener(port => {
|
||||
browser.runtime.onConnect.addListener(() => {
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import styles from "./styles.scss";
|
||||
import styles from "./styles.scss"; // eslint-disable-line no-unused-vars
|
||||
import Logger from "../../lib/log";
|
||||
import Open from "./lib/open";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче