typescript
Advanced tools
Comparing version 1.7.0-dev.20150917 to 1.7.0-dev.20150918
@@ -783,6 +783,25 @@ // This file contains the build logic for the public repo | ||
var tslintRuleDir = "scripts/tslint"; | ||
var tslintRules = ([ | ||
"nextLineRule", | ||
"noInferrableTypesRule", | ||
"noNullRule", | ||
"booleanTriviaRule" | ||
]); | ||
var tslintRulesFiles = tslintRules.map(function(p) { | ||
return path.join(tslintRuleDir, p + ".ts"); | ||
}); | ||
var tslintRulesOutFiles = tslintRules.map(function(p) { | ||
return path.join(builtLocalDirectory, "tslint", p + ".js"); | ||
}); | ||
desc("Compiles tslint rules to js"); | ||
task("build-rules", tslintRulesOutFiles); | ||
tslintRulesFiles.forEach(function(ruleFile, i) { | ||
compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ true, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint")); | ||
}); | ||
// if the codebase were free of linter errors we could make jake runtests | ||
// run this task automatically | ||
desc("Runs tslint on the compiler sources"); | ||
task("lint", [], function() { | ||
task("lint", ["build-rules"], function() { | ||
function success(f) { return function() { console.log('SUCCESS: No linter errors in ' + f + '\n'); }}; | ||
@@ -794,5 +813,5 @@ function failure(f) { return function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n') }}; | ||
var f = lintTargets[i]; | ||
var cmd = 'tslint -c tslint.json ' + f; | ||
var cmd = 'tslint --rules-dir built/local/tslint -c tslint.json ' + f; | ||
exec(cmd, success(f), failure(f)); | ||
} | ||
}, { async: true }); |
@@ -5,3 +5,3 @@ { | ||
"homepage": "http://typescriptlang.org/", | ||
"version": "1.7.0-dev.20150917", | ||
"version": "1.7.0-dev.20150918", | ||
"license": "Apache-2.0", | ||
@@ -8,0 +8,0 @@ "description": "TypeScript is a language for application scale JavaScript development", |
@@ -11,3 +11,4 @@ { | ||
"one-line": [true, | ||
"check-open-brace" | ||
"check-open-brace", | ||
"check-whitespace" | ||
], | ||
@@ -25,3 +26,4 @@ "no-unreachable": true, | ||
"check-separator", | ||
"check-type" | ||
"check-type", | ||
"check-module" | ||
], | ||
@@ -34,4 +36,13 @@ "typedef-whitespace": [true, { | ||
"variable-declaration": "nospace" | ||
}] | ||
}], | ||
"next-line": [true, | ||
"check-catch", | ||
"check-else" | ||
], | ||
"no-internal-module": true, | ||
"no-trailing-whitespace": true, | ||
"no-inferrable-types": true, | ||
"no-null": true, | ||
"boolean-trivia": true | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
12142628
233933