Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit cf1b7f3

Browse files
committed
style: update for tslint 5
1 parent f49f125 commit cf1b7f3

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"license": "MIT",
3838
"devDependencies": {
39-
"@knisterpeter/standard-tslint": "^1.3.0",
39+
"@knisterpeter/standard-tslint": "^1.4.0",
4040
"@types/babel-generator": "6.7.14",
4141
"@types/chalk": "0.4.31",
4242
"@types/diff": "0.0.31",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { createTypings } from './typings';
88

99
export interface InstanceOfResolver {
1010
(name: string): string|undefined;
11-
};
11+
}
1212

1313
// the IOptions is for backward compatibility
1414
export type IOptions = Options;

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ function printErrorWithContext(e: any, ast: any, options: IOptions): void {
200200
const errorLine = lines[e.loc.start.line - 1];
201201

202202
console.error(`Line ${e.loc.start.line - 1}: ${lines[e.loc.start.line - 2]}`);
203+
// tslint:disable-next-line prefer-template
203204
console.error(`Line ${e.loc.start.line}: ` + errorLine.substring(0, e.loc.start.column)
204205
+ chalk.red(errorLine.substring(e.loc.start.column, e.loc.end.column))
205206
+ errorLine.substring(e.loc.end.column));

src/typings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function createTypings(moduleName: string|null, programAst: any, options:
6060
} else {
6161
return dom.emit(m, dom.ContextFlags.Module);
6262
}
63-
};
63+
}
6464

6565
function createExportedTypes(m: dom.ModuleDeclaration, ast: AstQuery, componentName: string,
6666
reactComponentName: string|undefined, propTypes: any, propTypesName: string|undefined,

0 commit comments

Comments
 (0)