File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ npm-debug.log
1515# eslint-remote-tester
1616eslint-remote-tester-results
1717
18- # Lock file (project uses pnpm)
18+ # Lock file generated by npm install (project uses pnpm)
1919package-lock.json
Original file line number Diff line number Diff line change @@ -127,9 +127,10 @@ module.exports = {
127127 fix ( fixer ) {
128128 const sourceCode = context . getSourceCode ( ) ;
129129 const newKeyword = sourceCode . getFirstToken ( node ) ;
130+ const calleeToken = sourceCode . getTokenAfter ( newKeyword ) ;
130131 const fixes = [
131- // Remove the `new` keyword and the space after it
132- fixer . removeRange ( [ newKeyword . range [ 0 ] , newKeyword . range [ 1 ] + 1 ] ) ,
132+ // Remove the `new` keyword and any whitespace up to the callee
133+ fixer . removeRange ( [ newKeyword . range [ 0 ] , calleeToken . range [ 0 ] ] ) ,
133134 ] ;
134135 // Only rename the callee if it's not aliased
135136 if ( ! isAliased ) {
You can’t perform that action at this time.
0 commit comments