UNPKG

eslint-codemod-utils

Version:

A collection of AST helper functions for more complex ESLint rule fixes.

13 lines (12 loc) 365 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.insertAtStartOfFile = void 0; /** * Insert a generic string as a `Rule.Fix` at the start of a file. * * @returns {Rule.Fix} */ function insertAtStartOfFile(fixer, str) { return fixer.insertTextBeforeRange([0, 0], str); } exports.insertAtStartOfFile = insertAtStartOfFile;