Skip to content

Commit 7bf68dd

Browse files
Disable tslint (#223)
1 parent 38b2f55 commit 7bf68dd

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/Settings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public class Settings {
6464
public boolean sortDeclarations = false;
6565
public boolean sortTypeDeclarations = false;
6666
public boolean noFileComment = false;
67+
public boolean noTslintDisable = false;
6768
public List<File> javadocXmlFiles = null;
6869
public List<EmitterExtension> extensions = new ArrayList<>();
6970
public List<Class<? extends Annotation>> includePropertyAnnotations = new ArrayList<>();

typescript-generator-core/src/main/java/cz/habarta/typescript/generator/emitter/Emitter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public void emit(TsModel model, Writer output, String outputName, boolean closeO
3838
}
3939

4040
private void emitFileComment() {
41+
if (!settings.noTslintDisable) {
42+
writeIndentedLine("/* tslint:disable */");
43+
}
4144
if (!settings.noFileComment) {
4245
final String timestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
4346
writeIndentedLine("// Generated using typescript-generator version " + TypeScriptGenerator.Version + " on " + timestamp + ".");

typescript-generator-core/src/test/java/cz/habarta/typescript/generator/TestUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static Settings settings() {
1515
settings.outputKind = TypeScriptOutputKind.global;
1616
settings.jsonLibrary = JsonLibrary.jackson2;
1717
settings.noFileComment = true;
18+
settings.noTslintDisable = true;
1819
settings.newline = "\n";
1920
return settings;
2021
}

0 commit comments

Comments
 (0)