Skip to content

Commit

Permalink
Apply eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
wf9a5m75 committed Oct 15, 2018
1 parent 5d00f94 commit d50dc31
Show file tree
Hide file tree
Showing 61 changed files with 4,042 additions and 4,044 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www/Promise.js
42 changes: 42 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {
"env": {
"browser": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 5
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": 0
},
"globals": {
"require": false,
"Symbol": false,
"window": false,
"cordova": false,
"Promise": false,
"module": false,
"angular": false,
"firebase": false,
"exports": false,
"google": false,
"plugin": false
}
};
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@
"version": ">=10.0.0"
}
],
"scripts": {
"test": "npm run eslint",
"eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src"
},
"author": "Masashi Katsumata, Hirbod Mirjavadi",
"license": "Apache 2.0",
"bugs": {
"url": "https://github.com/mapsplugin/cordova-plugin-googlemaps/issues"
},
"homepage": "https://github.com/mapsplugin/cordova-plugin-googlemaps"
"homepage": "https://github.com/mapsplugin/cordova-plugin-googlemaps",
"dependencies": {
"eslint": "^5.7.0"
}
}
12 changes: 6 additions & 6 deletions src/after_plugin_install.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ module.exports = function(ctx) {
}

var fs = ctx.requireCordovaModule('fs'),
path = ctx.requireCordovaModule('path'),
Q = ctx.requireCordovaModule('q');
path = ctx.requireCordovaModule('path'),
Q = ctx.requireCordovaModule('q');
var pluginXmlPath = path.join(__dirname, '..', 'plugin.xml');

return Q.Promise(function(resolve, reject, notify) {
return Q.Promise(function(resolve, reject) {
// Copy the original plugin.xml to the current plugin.xml
return fs.createReadStream(pluginXmlPath + '.original')
.pipe(fs.createWriteStream(pluginXmlPath))
.on("error", reject)
.on("close", resolve);
.pipe(fs.createWriteStream(pluginXmlPath))
.on('error', reject)
.on('close', resolve);
});

};
Loading

0 comments on commit d50dc31

Please sign in to comment.