diff --git a/.eslintrc.json b/.eslintrc.json index c44c19a1..f170c0fb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,9 +15,6 @@ "rules": { "camelcase": "off", "eqeqeq": "warn", - "jsdoc/require-param": "warn", - "jsdoc/require-param-type": "warn", - "jsdoc/require-returns": "warn", "max-len": "off", "no-console": "off", "no-global-assign": "warn", @@ -27,8 +24,6 @@ "no-shadow": "off", "no-undef": "warn", "no-underscore-dangle": "off", - "no-unused-vars": "warn", - "no-use-before-define": "warn", "security/detect-non-literal-regexp": "off", "security/detect-unsafe-regex": "off", "unicorn/prefer-string-slice": "off" diff --git a/src/modules/core.js b/src/modules/core.js index 10cacba7..67fe61ec 100644 --- a/src/modules/core.js +++ b/src/modules/core.js @@ -1806,7 +1806,7 @@ * If there is no match, return false * * @param {string} string string to parse - * @param mwstyle + * @param {boolean} mwstyle convert to a mediawiki-style timestamp? * @return {Date|number} */ parseForTimestamp: function ( string, mwstyle ) { diff --git a/src/modules/submissions.js b/src/modules/submissions.js index 72343c87..6c2f949b 100644 --- a/src/modules/submissions.js +++ b/src/modules/submissions.js @@ -673,6 +673,7 @@ * specified by `new` * * @param {string} newCode + * @return {string} */ AFCH.Text.prototype.updateAfcTemplates = function ( newCode ) { this.removeAfcTemplates(); @@ -1332,6 +1333,8 @@ ); // Show a link to the next random submissions + // We need "new" here because Element uses "this." and needs the right context. + // eslint-disable-next-line no-new new AFCH.status.Element( 'Continue to next $1 or $2 »', { $1: AFCH.makeLinkElementToCategory( 'Pending AfC submissions', 'random submission' ), $2: AFCH.makeLinkElementToCategory( 'AfC pending submissions by age/0 days ago', 'zero-day-old submission' ) diff --git a/tests/scaffold.js b/tests/scaffold.js index 59723a23..bfed2d94 100644 --- a/tests/scaffold.js +++ b/tests/scaffold.js @@ -4,6 +4,8 @@ * the actual tests themselves. */ +/* eslint-env jest, node */ + jest.autoMockOff(); fs = require( 'fs' );