extend-fix-range.js 465 B

123456789101112131415
  1. 'use strict';
  2. /**
  3. Extend fix range to prevent changes from other rules.
  4. https://github.com/eslint/eslint/pull/13748/files#diff-c692f3fde09eda7c89f1802c908511a3fb59f5d207fe95eb009cb52e46a99e84R348
  5. @param {ruleFixer} fixer - The fixer to fix.
  6. @param {int[]} range - The extended range node.
  7. */
  8. function * extendFixRange(fixer, range) {
  9. yield fixer.insertTextBeforeRange(range, '');
  10. yield fixer.insertTextAfterRange(range, '');
  11. }
  12. module.exports = extendFixRange;