@so1ve/eslint-plugin-sort-imports 0.105.3 → 0.106.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/shared.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-plugin-sort-imports",
3
- "version": "0.105.3",
3
+ "version": "0.106.1",
4
4
  "author": "Simon Lydell",
5
5
  "contributors": [
6
6
  "Ray (https://github.com/so1ve) <i@mk1.io>"
package/src/shared.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const natsort = require("natsort");
3
+ const natsort = require("natsort").default;
4
4
 
5
5
  const NEWLINE = /(\r?\n)/;
6
6
 
@@ -44,7 +44,7 @@ function parseWhitespace(whitespace) {
44
44
  );
45
45
  }
46
46
 
47
- const naturalSort = natsort.default();
47
+ const naturalSort = natsort();
48
48
  function compare(path1, path2) {
49
49
  const path1Depth = path1.split("-").filter((p) => p === "__").length;
50
50
  const path2Depth = path2.split("-").filter((p) => p === "__").length;
@@ -62,6 +62,7 @@ function compare(path1, path2) {
62
62
  ? naturalSort(path1, path2)
63
63
  : path2Depth - path1Depth;
64
64
  }
65
+
65
66
  const isIdentifier = (node) => node.type === "Identifier";
66
67
 
67
68
  const isKeyword = (node) => node.type === "Keyword";