eslint-plugin-sort
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -48,3 +48,3 @@ "use strict"; | ||
const range = (0, _tsUtils.getNodeRange)(source, node); | ||
return source.getLastToken(node)?.type === "Punctuator" ? [range[0], range[1] - 1] : range; | ||
return (0, _tsUtils.isDelimiter)(source.getLastToken(node)) ? [range[0], range[1] - 1] : range; | ||
} | ||
@@ -51,0 +51,0 @@ |
@@ -9,2 +9,3 @@ "use strict"; | ||
exports.getNodeText = getNodeText; | ||
exports.isDelimiter = void 0; | ||
@@ -48,2 +49,10 @@ var _experimentalUtils = require("@typescript-eslint/experimental-utils"); | ||
return source.getText().slice(...getNodeRange(source, node)); | ||
} | ||
} | ||
/** | ||
* Returns true if the token is a delimiter (comma or semicolon). | ||
*/ | ||
const isDelimiter = token => token?.type === "Punctuator" && (token.value === "," || token.value === ";"); | ||
exports.isDelimiter = isDelimiter; |
{ | ||
"name": "eslint-plugin-sort", | ||
"description": "Auto-fixable sort rules for ESLint.", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"author": "Mark Skelton", | ||
@@ -6,0 +6,0 @@ "packageManager": "yarn@3.1.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20537
503