Skip to content

Commit

Permalink
Fix linting issues after upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
fatso83 committed May 7, 2024
1 parent 2fae20b commit 794aea4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 4 deletions.
15 changes: 12 additions & 3 deletions lib/sinon/util/core/get-property-descriptor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
"use strict";

/* eslint-disable jsdoc/valid-types */
/**
* @typedef {object} PropertyDescriptor
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description
* @property {boolean} configurable defaults to false
* @property {boolean} enumerable defaults to false
* @property {boolean} writable defaults to false
* @property {*} value defaults to undefined
* @property {Function} get defaults to undefined
* @property {Function} set defaults to undefined
*/

/*
* The following type def is strictly an illegal JSDoc, but the expression forms a
* The following type def is strictly speaking illegal in JSDoc, but the expression forms a
* legal Typescript union type and is understood by Visual Studio and the IntelliJ
* family of editors. The "TS" flavor of JSDoc is becoming the de-facto standard these
* days for that reason (and the fact that JSDoc is essentially unmaintained)
Expand All @@ -13,7 +23,6 @@
* a slightly enriched property descriptor
* @property {boolean} isOwn true if the descriptor is owned by this object, false if it comes from the prototype
*/
/* eslint-enable jsdoc/valid-types */

/**
* Returns a slightly modified property descriptor that one can tell is from the object or the prototype
Expand Down
2 changes: 1 addition & 1 deletion test/es2015/module-support-assessment-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import sinon from "../../pkg/sinon-esm.js";
const { assert, refute } = referee;

/**
* @param action
* @param action {string} the export on the `sinon` namespace to test
*/
function createTestSuite(action) {
var stub;
Expand Down
1 change: 1 addition & 0 deletions test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ describe("issues", function () {
};

let sandbox;

beforeEach(function () {
sandbox = sinon.createStubInstance(Foo);
});
Expand Down
1 change: 1 addition & 0 deletions test/proxy-call-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ describe("sinonSpy.call", function () {
describe("call.calledWithMatch", spyCallCalledTests("calledWithMatch"));
// eslint-disable-next-line mocha/no-setup-in-describe
describe("call.notCalledWith", spyCallNotCalledTests("notCalledWith"));

describe(
"call.notCalledWithMatch",
// eslint-disable-next-line mocha/no-setup-in-describe
Expand Down
1 change: 1 addition & 0 deletions test/proxy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe("proxy", function () {
});
assert.equals(named.printf("%n"), "cool");
});

it("anon", function () {
const anon = sinonSpy(function () {
return;
Expand Down
2 changes: 2 additions & 0 deletions test/spy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ describe("spy", function () {

// eslint-disable-next-line mocha/no-setup-in-describe
describe(".alwaysCalledWith", spyAlwaysCalledTests("alwaysCalledWith"));

describe(
".alwaysCalledWithMatch",
// eslint-disable-next-line mocha/no-setup-in-describe
Expand Down Expand Up @@ -1168,6 +1169,7 @@ describe("spy", function () {

// eslint-disable-next-line mocha/no-setup-in-describe
describe(".neverCalledWith", spyNeverCalledTests("neverCalledWith"));

describe(
".neverCalledWithMatch",
// eslint-disable-next-line mocha/no-setup-in-describe
Expand Down
1 change: 1 addition & 0 deletions test/stub-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ describe("stub", function () {

describe("lazy instantiation of exceptions", function () {
let errorSpy;

beforeEach(function () {
this.originalError = globalContext.Error;
errorSpy = createSpy(globalContext, "Error");
Expand Down

0 comments on commit 794aea4

Please sign in to comment.