check-side-effects
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -15,12 +15,5 @@ "use strict"; | ||
})(); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var rules_1 = require("tslint/lib/rules"); | ||
var ts = __importStar(require("typescript")); | ||
var typescript_1 = require("typescript"); | ||
var Rule = /** @class */ (function (_super) { | ||
@@ -57,3 +50,3 @@ __extends(Rule, _super); | ||
function walk(ctx) { | ||
return ts.forEachChild(ctx.sourceFile, function cb(node) { | ||
return typescript_1.forEachChild(ctx.sourceFile, function cb(node) { | ||
// Stop recursing into this branch if it's a definition construct. | ||
@@ -63,14 +56,14 @@ // These are function expression, function declaration, class, or arrow function (lambda). | ||
// need to mark function calls inside them as pure. | ||
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || | ||
ts.isClassDeclaration(node) || ts.isClassExpression(node) || ts.isArrowFunction(node) || | ||
ts.isMethodDeclaration(node) || ts.isInterfaceDeclaration(node)) { | ||
if (typescript_1.isFunctionDeclaration(node) || typescript_1.isFunctionExpression(node) || | ||
typescript_1.isClassDeclaration(node) || typescript_1.isClassExpression(node) || typescript_1.isArrowFunction(node) || | ||
typescript_1.isMethodDeclaration(node) || typescript_1.isInterfaceDeclaration(node)) { | ||
return; | ||
} | ||
// Fail any property access found. | ||
if (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) { | ||
if (typescript_1.isPropertyAccessExpression(node) || typescript_1.isElementAccessExpression(node)) { | ||
ctx.addFailureAtNode(node, Rule.FAILURE_STRING); | ||
} | ||
return ts.forEachChild(node, cb); | ||
return typescript_1.forEachChild(node, cb); | ||
}); | ||
} | ||
//# sourceMappingURL=noToplevelPropertyAccessRule.js.map |
{ | ||
"name": "check-side-effects", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Check if a ES module has side effects.", | ||
@@ -24,11 +24,11 @@ "repository": "https://github.com/filipesilva/check-side-effects", | ||
"rollup-plugin-node-resolve": "~4.2.3", | ||
"rollup-plugin-terser": "~4.0.4", | ||
"rollup-plugin-terser": "~4.0.4" | ||
}, | ||
"devDependencies": { | ||
"@types/minimist": "~1.2.0", | ||
"@types/terser": "~3.8.0", | ||
"tslib": "~1.9.3", | ||
"tslint": "^5.16.0", | ||
"typescript": "^3.4.5" | ||
}, | ||
"devDependencies": { | ||
"@types/minimist": "~1.2.0", | ||
"@types/terser": "~3.8.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
5
39825
5
401
- Removedtslib@~1.9.3
- Removedtslint@^5.16.0
- Removedtypescript@^3.4.5
- Removedansi-styles@3.2.1(transitive)
- Removedargparse@1.0.10(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbuiltin-modules@1.1.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddiff@4.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesprima@4.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedsemver@5.7.2(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtslib@1.9.3(transitive)
- Removedtslint@5.20.1(transitive)
- Removedtsutils@2.29.0(transitive)
- Removedtypescript@3.9.10(transitive)
- Removedwrappy@1.0.2(transitive)