Skip to content

Commit

Permalink
chore: updated eslint with applied fix (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed Dec 16, 2019
1 parent 49b61c5 commit ed926ad
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 24 deletions.
31 changes: 22 additions & 9 deletions .eslintrc.yml
@@ -1,10 +1,23 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

root: true
extends: semistandard
rules:
indent:
- error
- 4
camelcase: off
padded-blocks: off
operator-linebreak: off
no-throw-literal: off
extends: '@cordova/eslint-config/node'

overrides:
- files: [spec/**/*.js]
extends: '@cordova/eslint-config/node-tests'
6 changes: 3 additions & 3 deletions main.js
Expand Up @@ -67,9 +67,9 @@ var cmd = cli_opts.argv.remain.shift();

// Without these arguments, the commands will fail and print the usage anyway.
if (cli_opts.plugins_dir || cli_opts.project) {
cli_opts.plugins_dir = typeof cli_opts.plugins_dir === 'string' ?
cli_opts.plugins_dir :
path.join(cli_opts.project, 'cordova', 'plugins');
cli_opts.plugins_dir = typeof cli_opts.plugins_dir === 'string'
? cli_opts.plugins_dir
: path.join(cli_opts.project, 'cordova', 'plugins');
}

// Set up appropriate logging based on events
Expand Down
12 changes: 3 additions & 9 deletions package.json
Expand Up @@ -23,22 +23,16 @@
"p-try": "^2.2.0"
},
"devDependencies": {
"eslint": "^5.15.3",
"eslint-config-semistandard": "^13.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"@cordova/eslint-config": "^2.0.0",
"jasmine": "^3.3.1",
"rewire": "^4.0.1"
},
"bin": {
"plugman": "./main.js"
},
"scripts": {
"test": "npm run eslint && jasmine",
"eslint": "eslint ."
"test": "npm run lint && jasmine",
"lint": "eslint ."
},
"license": "Apache-2.0",
"contributors": [
Expand Down
2 changes: 0 additions & 2 deletions spec/.eslintrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/commands.js
Expand Up @@ -67,7 +67,7 @@ module.exports = {

platform (cli_opts) {
assertRequiredOptions(cli_opts, ['platform_name']);
var operation = cli_opts.argv.remain[ 0 ] || '';
var operation = cli_opts.argv.remain[0] || '';
if (operation !== 'add' && operation !== 'remove') {
throw new Error(`Operation must be either 'add' or 'remove' but was '${operation}'`);
}
Expand Down

0 comments on commit ed926ad

Please sign in to comment.