Skip to content

Commit

Permalink
Update getBuiltinRule (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Feb 17, 2022
1 parent 70dcc97 commit 6ad3c60
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions rules/utils/get-builtin-rule.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
'use strict';

function getBuiltinRule(id) {
// TODO: Remove this when we drop support for ESLint 7
const eslintVersion = require('eslint/package.json').version;
/* c8 ignore next 3 */
if (eslintVersion.startsWith('7.')) {
return require(`eslint/lib/rules/${id}`);
}

return require('eslint/use-at-your-own-risk').builtinRules.get(id);
}

Expand Down

0 comments on commit 6ad3c60

Please sign in to comment.