File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11# ESLint Transforms
22
33A collection of jscodeshift transforms to help upgrade ESLint rules to new versions of [ ESLint] ( https://github.com/eslint/eslint ) .
4- Supports [ Node.js] ( https://nodejs.org ) version 4 or above.
4+ Supports [ Node.js] ( https://nodejs.org ) version 20 or above.
55
66## Installation
77
@@ -41,11 +41,11 @@ to the new format, introduced in ESLint 2.10.0:
4141
4242``` javascript
4343module .exports = {
44- meta: {
45- docs: {},
46- schema: []
47- },
48- create : function (context ) { ... }
44+ meta: {
45+ docs: {},
46+ schema: []
47+ },
48+ create : function (context ) { ... }
4949};
5050```
5151
Original file line number Diff line number Diff line change 1010//------------------------------------------------------------------------------
1111// Requirements
1212//------------------------------------------------------------------------------
13+
1314const path = require ( "node:path" ) ;
1415
1516//------------------------------------------------------------------------------
@@ -93,10 +94,9 @@ function getParentObjectMethod(nodePath) {
9394/**
9495 * Transforms an ESLint rule from the old format to the new format.
9596 * @param {Object } fileInfo holds information about the currently processed file.
96- * * @param {Object } api holds the jscodeshift API
97+ * @param {Object } api holds the jscodeshift API
9798 * @returns {string } the new source code, after being transformed.
9899 */
99-
100100module . exports = function ( fileInfo , api ) {
101101 const j = api . jscodeshift ;
102102 const root = j ( fileInfo . source ) ;
You can’t perform that action at this time.
0 commit comments