Lint JS files w/out extension too (#453)

Prior to this change, JS files without extension had not been linted.

To match them, we need a combination of positive and negative globbing
that does not mix well with the existing file selection for linting. Thus, we use
npm-run-all to run two ESLint invocations unconditionally in sequence
while still preserving the error code.

* Lint JS w/out extension too
* Fix newly surfaced linting errors
* Make use of npm-run-all for test script too
This commit is contained in:
Raphael von der Grün
2018-06-18 23:48:02 +02:00
committed by GitHub
parent 2c3db19310
commit 393dad6349
16 changed files with 87 additions and 84 deletions
+3 -3
View File
@@ -18,13 +18,13 @@
specific language governing permissions and limitations
under the License.
*/
var path = require('path');
var path = require('path');
var Api = require('./templates/cordova/Api');
var args = require('nopt')({
var args = require('nopt')({
'link': Boolean,
'shared': Boolean,
'help': Boolean
}, { 'd' : '--verbose' });
}, { 'd': '--verbose' });
if (args.help || args.argv.remain.length === 0) {
console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'update')) + ' <path_to_project> [--link]');