Skip to content

Commit

Permalink
fix(eslint): move attributes to the last instead
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 2, 2023
1 parent d11e472 commit b4e0587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/order-attributify.ts
Expand Up @@ -50,7 +50,7 @@ export default ESLintUtils.RuleCreator(name => name)({

const sortedNodes = valueless
.map((i: TSESTree.Node) => [i.range[0] - offset, i.range[1] - offset] as const)
.sort((a: any, b: any) => a[0] - b[0])
.sort((a: any, b: any) => b[0] - a[0])

for (let [start, end] of sortedNodes.slice(1)) {
if (code[start - 1] === ' ')
Expand Down

0 comments on commit b4e0587

Please sign in to comment.