mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
Share a common tslint.json between the language service and the hyiene task
This commit is contained in:
parent
00df3bdc28
commit
9c553da1c8
|
@ -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": [
|
||||
|
|
Loading…
Reference in a new issue