@fimbul/wotan
Advanced tools
Comparing version 0.2.0-dev.20180221 to 0.2.0-dev.20180222
{ | ||
"name": "@fimbul/wotan", | ||
"version": "0.2.0-dev.20180221", | ||
"version": "0.2.0-dev.20180222", | ||
"description": "Pluggable TypeScript and JavaScript linter", | ||
@@ -44,3 +44,2 @@ "bin": "bin/main.js", | ||
"@types/semver": "^5.4.0", | ||
"@types/to-absolute-glob": "^2.0.0", | ||
"escape-string-regexp": "^1.0.5", | ||
@@ -64,3 +63,2 @@ "rimraf": "^2.6.2" | ||
"semver": "^5.4.1", | ||
"to-absolute-glob": "^2.0.1", | ||
"tslib": "^1.8.1", | ||
@@ -67,0 +65,0 @@ "tsutils": "^2.20.0" |
@@ -54,3 +54,3 @@ # wotan | ||
`no-unused-label` | Warns about labels that are never used or at the wrong position. | TSLint only has `label-position` which doesn't check for unused labels. | ||
`no-useless-assertion` | Detects type assertions that don't change the type or are not necessary in the first place. *requires type information* | TSLint's `no-unnecessary-type-assertion` does not detect assertions needed to silence the compiler warning `Variable ... is used before being assigned.` This one also checks if the assertion is necessary at all. | ||
`no-useless-assertion` | Detects type assertions that don't change the type or are not necessary in the first place. *requires type information* | TSLint's `no-unnecessary-type-assertion` does not detect assertions needed to silence the compiler warning `Variable ... is used before being assigned.` The Wotan builtin rule also checks whether the assertion is necessary at all or the receiver accepts the original type. | ||
`no-useless-initializer` | Detects unnecessary initialization with `undefined`. | TSLint's rule `no-unnecessary-initializer` doesn't fix all parameter initializers and gives false positives for destructuring. | ||
@@ -57,0 +57,0 @@ `syntaxcheck` | Reports syntax errors as lint errors. This rule is **not** enabled in `wotan:recommended`. *requires type information* | Used to be part of the deprecated `tslint --type-check` |
@@ -11,3 +11,2 @@ "use strict"; | ||
const minimatch_1 = require("minimatch"); | ||
const resolveGlob = require("to-absolute-glob"); | ||
const error_1 = require("./error"); | ||
@@ -136,5 +135,6 @@ const processor_loader_1 = require("./services/processor-loader"); | ||
const files = []; | ||
const originalNames = []; | ||
const libDirectory = utils_1.unixifyPath(path.dirname(ts.getDefaultLibFilePath(program.getCompilerOptions()))) + '/'; | ||
const include = patterns.map((p) => new minimatch_1.Minimatch(resolveGlob(p, { cwd }))); | ||
const ex = exclude.map((p) => new minimatch_1.Minimatch(resolveGlob(p, { cwd }), { dot: true })); | ||
const include = patterns.map((p) => new minimatch_1.Minimatch(p)); | ||
const ex = exclude.map((p) => new minimatch_1.Minimatch(p, { dot: true })); | ||
const typeRoots = ts.getEffectiveTypeRoots(program.getCompilerOptions(), host); | ||
@@ -155,3 +155,3 @@ outer: for (const sourceFile of program.getSourceFiles()) { | ||
} | ||
const originalName = host.getFileSystemFile(fileName); | ||
const originalName = path.relative(cwd, host.getFileSystemFile(fileName)); | ||
if (include.length !== 0 && !include.some((e) => e.match(originalName))) | ||
@@ -162,4 +162,5 @@ continue; | ||
files.push(fileName); | ||
originalNames.push(originalName); | ||
} | ||
ensurePatternsMatch(include, ex, files); | ||
ensurePatternsMatch(include, ex, originalNames); | ||
return { files, program }; | ||
@@ -166,0 +167,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
366543
17
15
4690
- Removedto-absolute-glob@^2.0.1
- Removedis-absolute@1.0.0(transitive)
- Removedis-relative@1.0.0(transitive)
- Removedis-unc-path@1.0.0(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedto-absolute-glob@2.0.2(transitive)
- Removedunc-path-regex@0.1.2(transitive)