diff --git a/README.md b/README.md index ef217bc..3eaaa99 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ESLint Transforms A collection of jscodeshift transforms to help upgrade ESLint rules to new versions of [ESLint](https://github.com/eslint/eslint). -Supports [Node.js](https://nodejs.org) version 4 or above. +Supports [Node.js](https://nodejs.org) version 20 or above. ## Installation @@ -41,11 +41,11 @@ to the new format, introduced in ESLint 2.10.0: ```javascript module.exports = { - meta: { - docs: {}, - schema: [] - }, - create: function(context) { ... } + meta: { + docs: {}, + schema: [] + }, + create: function(context) { ... } }; ``` diff --git a/lib/v9-rule-migration/v9-rule-migration.js b/lib/v9-rule-migration/v9-rule-migration.js index 653b024..7ccf813 100644 --- a/lib/v9-rule-migration/v9-rule-migration.js +++ b/lib/v9-rule-migration/v9-rule-migration.js @@ -10,6 +10,7 @@ //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ + const path = require("node:path"); //------------------------------------------------------------------------------ @@ -93,10 +94,9 @@ function getParentObjectMethod(nodePath) { /** * Transforms an ESLint rule from the old format to the new format. * @param {Object} fileInfo holds information about the currently processed file. - * * @param {Object} api holds the jscodeshift API + * @param {Object} api holds the jscodeshift API * @returns {string} the new source code, after being transformed. */ - module.exports = function(fileInfo, api) { const j = api.jscodeshift; const root = j(fileInfo.source);