mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 19:35:08 -05:00
Share a common tslint.json between the language service and the hyiene task
This commit is contained in:
@@ -226,8 +226,8 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
}
|
||||
|
||||
const program = tslint.Linter.createProgram("src/tsconfig.json");
|
||||
const configuration = tslint.Configuration.findConfiguration('tslint.json', '.');
|
||||
const tslintOptions = { formatter: 'json', rulesDirectory: 'build/lib/tslint' };
|
||||
const configuration = tslint.Configuration.findConfiguration('tslint-hygiene.json', '.');
|
||||
const tslintOptions = { fix: false, formatter: 'json' };
|
||||
const linter = new tslint.Linter(tslintOptions, program);
|
||||
|
||||
const tsl = es.through(function (file) {
|
||||
@@ -266,7 +266,7 @@ const hygiene = exports.hygiene = (some, options) => {
|
||||
this.emit('data', data);
|
||||
}, function () {
|
||||
process.stdout.write('\n');
|
||||
|
||||
|
||||
const tslintResult = linter.getResult();
|
||||
if (tslintResult.failures.length > 0) {
|
||||
reportFailures(tslintResult.failures);
|
||||
|
||||
6
tslint-hygiene.json
Normal file
6
tslint-hygiene.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "./tslint.json",
|
||||
"rules": {
|
||||
"no-unused-variable": true
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@
|
||||
"no-string-throw": true,
|
||||
"no-unused-expression": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-unused-variable": true, // requires type information in tslint > v4 only works for hyiene tasks
|
||||
"curly": true,
|
||||
"class-name": true,
|
||||
"semicolon": [
|
||||
|
||||
Reference in New Issue
Block a user