diff --git a/.travis.yml b/.travis.yml index 51d8f8d..28e1328 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ node_js: - '10' - '8' - '6' -- '4' script: npm test diff --git a/package.json b/package.json index 7f0ae79..0a79692 100644 --- a/package.json +++ b/package.json @@ -83,10 +83,6 @@ "node", "mocha" ], - "rules": { - "prefer-destructuring": 0, - "prefer-rest-params": 0 - }, "prettier": true }, "config": { diff --git a/src/reporter.js b/src/reporter.js index 8c9e6ba..bd825c9 100644 --- a/src/reporter.js +++ b/src/reporter.js @@ -1,5 +1,3 @@ -'use strict'; - const istanbul = require('istanbul-api'); const util = require('./util'); @@ -187,6 +185,7 @@ function CoverageIstanbulReporter(baseReporterDecorator, logger, config) { const baseReporterOnRunComplete = this.onRunComplete; this.onRunComplete = function(browsers, results) { + // eslint-disable-next-line prefer-rest-params baseReporterOnRunComplete.apply(this, arguments); if (coverageConfig.combineBrowserReports) { diff --git a/src/util.js b/src/util.js index 315fa14..07c8509 100644 --- a/src/util.js +++ b/src/util.js @@ -1,5 +1,3 @@ -'use strict'; - const path = require('path'); const minimatch = require('minimatch'); @@ -23,7 +21,7 @@ function fixWebpackFilePath(filePath) { } function fixWebpackSourcePaths(sourceMap, webpackConfig) { - let sourceRoot = sourceMap.sourceRoot; + let { sourceRoot } = sourceMap; // Fix for https://github.com/mattlewis92/karma-coverage-istanbul-reporter/issues/32 // The sourceRoot is relative to the project directory and not an absolute path, so add the webpack context to it if set if ( diff --git a/test/reporter.spec.js b/test/reporter.spec.js index ade2ba2..a417eab 100644 --- a/test/reporter.spec.js +++ b/test/reporter.spec.js @@ -5,9 +5,9 @@ const chai = require('chai'); const karma = require('karma'); const rimraf = require('rimraf'); const karmaCoverageIstanbulReporter = require('../src/reporter'); -const OUTPUT_LOG_FILE = require('./karma.conf').OUTPUT_LOG_FILE; +const { OUTPUT_LOG_FILE } = require('./karma.conf'); -const expect = chai.expect; +const { expect } = chai; const OUTPUT_PATH = path.join(__dirname, 'fixtures', 'outputs'); const OUTPUT_FILE = path.join(OUTPUT_PATH, 'coverage-summary.json'); const fileReadTimeout = 300; diff --git a/test/util.spec.js b/test/util.spec.js index 2b4e661..7ad3635 100644 --- a/test/util.spec.js +++ b/test/util.spec.js @@ -1,5 +1,5 @@ -const expect = require('chai').expect; -const fixWebpackSourcePaths = require('../src/util').fixWebpackSourcePaths; +const { expect } = require('chai'); +const { fixWebpackSourcePaths } = require('../src/util'); const originalPlatform = process.platform;