You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to apply the rule to a file that contains the following require:
const{ mongoPort, ...ports}=require('app/ports')
But for some reason, the rule was throwing this error (I removed the full path for privacy purposes):
TypeError: Cannot read property 'name' of undefined
Occurred while linting /Path/to/file/index.js:1
at getSortableName (/Path/to/file/node_modules/eslint-plugin-require-sort/dist/index.js:179:75)
at Array.map (<anonymous>)
at handlePropertySort (/Path/to/file/node_modules/eslint-plugin-require-sort/dist/index.js:107:47)
at Array.forEach (<anonymous>)
at ProgramExit (/Path/to/file/node_modules/eslint-plugin-require-sort/dist/index.js:252:44)
at /Path/to/file/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/Path/to/file/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/Path/to/file/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
at NodeEvent
But when I changed the code to the following line, it worked and the error stopped:
I was trying to apply the rule to a file that contains the following require:
But for some reason, the rule was throwing this error (I removed the full path for privacy purposes):
But when I changed the code to the following line, it worked and the error stopped:
Is this error intended, or is it a bug?
The text was updated successfully, but these errors were encountered: