File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import * as os from 'os'
99import * as path from 'path'
1010import { dependencies } from './dependencies'
1111import * as presetsModule from './presets'
12- import { equivalentSimplified } from './simplify'
1312
1413export const codegen : eslint . Rule . RuleModule = {
1514 // @ts -expect-error types are wrong?
@@ -215,14 +214,15 @@ export const codegen: eslint.Rule.RuleModule = {
215214 return
216215 }
217216
218- const patch = diff . createPatch ( context . physicalFilename , existingContent , result . right )
217+ const patch = diff . createPatch ( context . physicalFilename , existingContent . trimEnd ( ) , result . right . trimEnd ( ) )
219218 for ( const parsedPatch of diff . parsePatch ( patch ) ) {
220219 for ( const hunk of parsedPatch . hunks ) {
221220 let message = `Content doesn't match:\n`
222221 message += hunk . lines . join ( '\n' )
223222 const startPosition = position ( range [ 0 ] )
224223
225- const fix : Parameters < typeof context . report > [ 0 ] [ 'fix' ] = fixer => fixer . replaceTextRange ( range , normalise ( result . right ) + os . EOL )
224+ const fix : Parameters < typeof context . report > [ 0 ] [ 'fix' ] = fixer =>
225+ fixer . replaceTextRange ( range , normalise ( result . right ) + os . EOL )
226226 context . report ( {
227227 message,
228228 loc : {
You can’t perform that action at this time.
0 commit comments