Skip to content

Commit

Permalink
chore: add jsdoc type annotation to rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Nov 11, 2021
1 parent f1b6258 commit b0e3f56
Show file tree
Hide file tree
Showing 39 changed files with 117 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/rules/assert-args.js
Expand Up @@ -15,6 +15,9 @@ const assert = require("assert"),
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/literal-compare-order.js
Expand Up @@ -24,6 +24,9 @@ function swapFirstTwoNodesInList(sourceCode, fixer, list) {
];
}

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-arrow-tests.js
Expand Up @@ -16,6 +16,9 @@ const utils = require("../utils.js");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-assert-equal-boolean.js
Expand Up @@ -13,6 +13,9 @@ const assert = require("assert"),

const EQUALITY_ASSERTIONS = new Set(["equal", "deepEqual", "strictEqual"]);

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-assert-equal.js
Expand Up @@ -16,6 +16,9 @@ const assert = require("assert"),
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-assert-logical-expression.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-assert-ok.js
Expand Up @@ -24,6 +24,9 @@ const ERROR_MESSAGE_CONFIG = {
unexpectedLocalAssertionMessageId: LOCAL_ERROR_MESSAGE_ID }
};

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-async-in-loops.js
Expand Up @@ -11,6 +11,9 @@ const assert = require("assert"),
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-async-module-callbacks.js
Expand Up @@ -22,6 +22,9 @@ function isAsyncFunctionExpression(node) {
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-async-test.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-commented-tests.js
Expand Up @@ -8,6 +8,9 @@
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-compare-relation-boolean.js
Expand Up @@ -15,6 +15,9 @@ const assert = require("assert"),
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-conditional-assertions.js
Expand Up @@ -26,6 +26,9 @@ const STOP_NODE_TYPES = new Set([
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-early-return.js
Expand Up @@ -15,6 +15,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-global-assertions.js
Expand Up @@ -15,6 +15,9 @@ const { ReferenceTracker } = require("eslint-utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-global-expect.js
Expand Up @@ -14,6 +14,9 @@ const { ReferenceTracker } = require("eslint-utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-global-module-test.js
Expand Up @@ -14,6 +14,9 @@ const { ReferenceTracker } = require("eslint-utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-global-stop-start.js
Expand Up @@ -12,6 +12,9 @@ const { ReferenceTracker } = require("eslint-utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-hooks-from-ancestor-modules.js
Expand Up @@ -16,6 +16,9 @@ const utils = require("../utils");

const NESTABLE_HOOK_NAMES = new Set(["afterEach", "beforeEach"]);

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-identical-names.js
Expand Up @@ -18,6 +18,9 @@ function findLast(arr, callback) {
return [...arr].reverse().find(item => callback(item));
}

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-init.js
Expand Up @@ -10,6 +10,9 @@
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-jsdump.js
Expand Up @@ -8,6 +8,9 @@
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-loose-assertions.js
Expand Up @@ -64,6 +64,9 @@ function parseOptions(options) {
return [DEFAULT_ASSERTIONS, ERROR_MESSAGE_CONFIG];
}

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-negated-ok.js
Expand Up @@ -18,6 +18,9 @@ const ASSERTION_OPPOSITES = {
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-nested-tests.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-ok-equality.js
Expand Up @@ -10,6 +10,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-only.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-qunit-push.js
Expand Up @@ -8,6 +8,9 @@
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-qunit-start-in-tests.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-qunit-stop.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-reassign-log-callbacks.js
Expand Up @@ -10,6 +10,9 @@
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-reset.js
Expand Up @@ -10,6 +10,9 @@
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-setup-teardown.js
Expand Up @@ -12,6 +12,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-skip.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-test-expect-argument.js
Expand Up @@ -14,6 +14,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/no-throws-string.js
Expand Up @@ -41,6 +41,9 @@ function isThrows(calleeNode, assertVar) {
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/require-expect.js
Expand Up @@ -11,6 +11,9 @@ const utils = require("../utils");
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "suggestion",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/require-object-in-propequal.js
Expand Up @@ -15,6 +15,9 @@ const assert = require("assert"),
// Rule Definition
//------------------------------------------------------------------------------

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/resolve-async.js
Expand Up @@ -10,6 +10,9 @@

const utils = require("../utils");

/**
* @type {import('eslint').Rule.RuleModule}
*/
module.exports = {
meta: {
type: "problem",
Expand Down

0 comments on commit b0e3f56

Please sign in to comment.