chore(tslint): disallow variable names that look like keywords.
We've had issues such as the one I documented: https://github.com/Microsoft/TypeScript/issues/5187 This tslint check prevents this happening again. This change also updates to the newest tslint which gets typings from npm. Closes #4970
This commit is contained in:
@ -294,14 +294,15 @@ gulp.task('lint', ['build.tools'], function() {
|
||||
// https://github.com/palantir/tslint#supported-rules
|
||||
var tslintConfig = {
|
||||
"rules": {
|
||||
"semicolon": true,
|
||||
"requireParameterType": true,
|
||||
"requireReturnType": true,
|
||||
"requireParameterType": true
|
||||
"semicolon": true,
|
||||
"variable-name": [true, "ban-keywords"]
|
||||
}
|
||||
};
|
||||
return gulp.src(['modules/angular2/src/**/*.ts', '!modules/angular2/src/testing/**'])
|
||||
.pipe(tslint({
|
||||
tslint: require('tslint'),
|
||||
tslint: require('tslint').default,
|
||||
configuration: tslintConfig,
|
||||
rulesDirectory: 'dist/tools/tslint'
|
||||
}))
|
||||
|
Reference in New Issue
Block a user