experiment with unused variables
This commit is contained in:
parent
e09d5fc524
commit
c51cdbdf8f
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
@ -9,7 +9,7 @@
|
|||
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
|
||||
"stopOnEntry": true,
|
||||
"args": [
|
||||
"watch-extension:json-client"
|
||||
"hygiene"
|
||||
],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
|
|
|
@ -119,8 +119,8 @@ const eslintFilter = [
|
|||
|
||||
const tslintFilter = [
|
||||
'src/**/*.ts',
|
||||
'test/**/*.ts',
|
||||
'extensions/**/*.ts',
|
||||
//'test/**/*.ts',
|
||||
//'extensions/**/*.ts',
|
||||
'!**/fixtures/**',
|
||||
'!**/typings/**',
|
||||
'!**/node_modules/**',
|
||||
|
@ -227,15 +227,19 @@ const hygiene = exports.hygiene = (some, options) => {
|
|||
|
||||
const tsl = es.through(function (file) {
|
||||
const configuration = tslint.Configuration.findConfiguration(null, '.');
|
||||
const program = tslint.Linter.createProgram("tsconfig.json", "src/");
|
||||
const options = { formatter: 'json', rulesDirectory: 'build/lib/tslint' };
|
||||
const contents = file.contents.toString('utf8');
|
||||
const linter = new tslint.Linter(options);
|
||||
linter.lint(file.relative, contents, configuration.results);
|
||||
const result = linter.getResult();
|
||||
const linter = new tslint.Linter(options, program);
|
||||
if (file.relative.startsWith('src')) {
|
||||
|
||||
if (result.failures.length > 0) {
|
||||
reportFailures(result.failures);
|
||||
errorCount += result.failures.length;
|
||||
linter.lint(file.relative, contents, configuration.results);
|
||||
const result = linter.getResult();
|
||||
|
||||
if (result.failures.length > 0) {
|
||||
reportFailures(result.failures);
|
||||
errorCount += result.failures.length;
|
||||
}
|
||||
}
|
||||
|
||||
this.emit('data', file);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"no-string-throw": true,
|
||||
"no-unused-expression": true,
|
||||
"no-duplicate-variable": true,
|
||||
// "no-unused-variable": true, // requires type information in tslint > v4
|
||||
"no-unused-variable": true, // requires type information in tslint > v4
|
||||
"curly": true,
|
||||
"class-name": true,
|
||||
"semicolon": [
|
||||
|
|
Loading…
Reference in a new issue