Skip to content

Commit

Permalink
Add jsdoc type to externally-exported rules (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Nov 18, 2021
1 parent ba64055 commit 2e22382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions rules/utils/create-deprecated-rules.js
Expand Up @@ -3,6 +3,7 @@ const packageJson = require('../../package.json');

const repoUrl = 'https://github.com/sindresorhus/eslint-plugin-unicorn';

/** @returns {{ [ruleName: string]: import('eslint').Rule.RuleModule }} */
function createDeprecatedRules(data) {
return Object.fromEntries(
Object.entries(data).map(([ruleId, replacedBy = []]) => [
Expand Down
1 change: 1 addition & 0 deletions rules/utils/rule.js
Expand Up @@ -74,6 +74,7 @@ function checkVueTemplate(create, options) {
return wrapped;
}

/** @returns {import('eslint').Rule.RuleModule} */
function loadRule(ruleId) {
const rule = require(`../${ruleId}`);

Expand Down

0 comments on commit 2e22382

Please sign in to comment.