fix eslint, add to ci
This commit is contained in:
parent
de46310d93
commit
3eb72bab9d
|
@ -28,6 +28,9 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: flow
|
name: flow
|
||||||
command: npm run flow
|
command: npm run flow
|
||||||
|
- run:
|
||||||
|
name: eslint
|
||||||
|
command: npm run eslint
|
||||||
# - store_artifacts:
|
# - store_artifacts:
|
||||||
# path: test-results.xml
|
# path: test-results.xml
|
||||||
# prefix: tests
|
# prefix: tests
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
"parser": "babel-eslint",
|
||||||
|
"plugins": [
|
||||||
|
"flowtype"
|
||||||
|
],
|
||||||
'extends': [
|
'extends': [
|
||||||
// "google",
|
// "google",
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
|
"plugin:flowtype/recommended",
|
||||||
],
|
],
|
||||||
'env': {
|
'env': {
|
||||||
'browser': true,
|
'browser': true,
|
||||||
|
|
|
@ -13,11 +13,13 @@
|
||||||
"@babel/core": "^7.2.2",
|
"@babel/core": "^7.2.2",
|
||||||
"@babel/preset-env": "^7.2.3",
|
"@babel/preset-env": "^7.2.3",
|
||||||
"@babel/preset-flow": "^7.0.0",
|
"@babel/preset-flow": "^7.0.0",
|
||||||
|
"babel-eslint": "^10.0.1",
|
||||||
"clean-webpack-plugin": "^1.0.0",
|
"clean-webpack-plugin": "^1.0.0",
|
||||||
"copy-webpack-plugin": "^4.2.0",
|
"copy-webpack-plugin": "^4.2.0",
|
||||||
"css-loader": "^2.1.0",
|
"css-loader": "^2.1.0",
|
||||||
"eslint": "^5.12.0",
|
"eslint": "^5.12.0",
|
||||||
"eslint-config-google": "^0.11.0",
|
"eslint-config-google": "^0.11.0",
|
||||||
|
"eslint-plugin-flowtype": "^3.2.0",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"flow-bin": "^0.89.0",
|
"flow-bin": "^0.89.0",
|
||||||
"flow-interfaces-chrome": "^0.5.3",
|
"flow-interfaces-chrome": "^0.5.3",
|
||||||
|
|
|
@ -88,7 +88,7 @@ chrome.commands.onCommand.addListener(command => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener((message: any, sender: chrome$MessageSender, sendResponse) => {
|
chrome.runtime.onMessage.addListener((message: any, sender: chrome$MessageSender, sendResponse) => { // eslint-disable-line no-unused-vars
|
||||||
if (message.method === METHOD_CAPTURE_WITH_EXTRAS) {
|
if (message.method === METHOD_CAPTURE_WITH_EXTRAS) {
|
||||||
const comment = message.comment;
|
const comment = message.comment;
|
||||||
const tag_str = message.tag_str;
|
const tag_str = message.tag_str;
|
||||||
|
|
|
@ -8,7 +8,7 @@ export function showNotification(text: string, priority: number=0) {
|
||||||
Notification.requestPermission();
|
Notification.requestPermission();
|
||||||
} else {
|
} else {
|
||||||
// TODO ugh. is there no way to show in-browser only notification??
|
// TODO ugh. is there no way to show in-browser only notification??
|
||||||
const notification = new Notification(
|
new Notification(
|
||||||
'grasp-notification',
|
'grasp-notification',
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ function submitComment () {
|
||||||
'method': METHOD_CAPTURE_WITH_EXTRAS,
|
'method': METHOD_CAPTURE_WITH_EXTRAS,
|
||||||
'comment': comment_text,
|
'comment': comment_text,
|
||||||
'tag_str': tag_str,
|
'tag_str': tag_str,
|
||||||
}, resp => {
|
}, () => {
|
||||||
console.log("[popup] captured!");
|
console.log("[popup] captured!");
|
||||||
});
|
});
|
||||||
window.close();
|
window.close();
|
||||||
|
|
Loading…
Reference in a new issue