@magicspace/tslint-rules
Advanced tools
Comparing version 0.1.24 to 0.1.25
@@ -203,2 +203,5 @@ "use strict"; | ||
} | ||
else if (typescript_1.isCaseClause(parent) || typescript_1.isDefaultClause(parent)) { | ||
return parent.getChildAt(siblingCount - 1); | ||
} | ||
if (parent.getChildCount() > 0) { | ||
@@ -205,0 +208,0 @@ return parent.getChildAt(0); |
@@ -11,4 +11,4 @@ "use strict"; | ||
const RELATIVE_PATH_REGEX = /^(?:\.{1,2}[\\/])+/; | ||
const CURRENT_RELATIVE_PATH_REGEX = /^\w/; | ||
const ERROR_MESSAGE_NONSTANDARD_IMPORT_PATH = 'The import path is invalid.'; | ||
const UPPER_RELATIVE_PATH_REGEX = /^\.\.\//; | ||
const ERROR_MESSAGE_NONSTANDARD_IMPORT_PATH = 'The import path could be smarter.'; | ||
class Rule extends tslint_1.Rules.AbstractRule { | ||
@@ -59,3 +59,3 @@ apply(sourceFile) { | ||
.join('/'); | ||
if (CURRENT_RELATIVE_PATH_REGEX.test(relativePath)) { | ||
if (!UPPER_RELATIVE_PATH_REGEX.test(relativePath)) { | ||
relativePath = `./${relativePath}`; | ||
@@ -62,0 +62,0 @@ } |
{ | ||
"name": "@magicspace/tslint-rules", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"description": "Custom TSLint rules for MagicSpace.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/makeflow/magicspace.git", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
51770
1340
0