UNPKG

eslint-codemod-utils

Version:

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

9 lines (8 loc) 206 B
/** * Insert a generic string as a `Rule.Fix` at the start of a file. * * @returns {Rule.Fix} */ export function insertAtStartOfFile(fixer, str) { return fixer.insertTextBeforeRange([0, 0], str); }