Skip to content

Commit

Permalink
refactor: apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
headlessNode committed Dec 6, 2024
1 parent 8630e60 commit dcf3c37
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ var OPTS_COMPARE = {
function main( context ) {
var expressions;
var prevAlias;
var sorted;

expressions = [];

Expand Down Expand Up @@ -84,19 +83,20 @@ function main( context ) {
* Reports the error message.
*
* @private
* @param {string} current - name of first package
* @param {string} last - name of second package
* @param {string} last - name of first package
* @param {string} current - name of second package
* @param {ASTNode} node - node to report
*/
function report( current, last, node ) {
function report( last, current, node ) {
context.report({
'node': node,
'message': '"'+last+'" should come before "'+current+'"',
'message': '"'+current+'" should come before "'+last+'"',
'fix': fix
});

/**
* Fixes the lint error by reordering the packages.
*
* @private
* @param {Function} fixer - ESLint fixer
* @returns {(Object|null)} fix or null
Expand All @@ -105,6 +105,7 @@ function main( context ) {
var replacingText;
var startRange;
var endRange;
var sorted;
var source;
var txt;
var i;
Expand Down

0 comments on commit dcf3c37

Please sign in to comment.