Skip to content

Commit a5f3a5d

Browse files
author
Forbes Lindesay
authored
feat: disable tslint (#15)
1 parent 8ee2a2f commit a5f3a5d

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

src/Example.validator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* tslint:disable */
2+
// generated by typescript-json-validator
13
import {inspect} from 'util';
24
import Ajv = require('ajv');
35
import ExampleType from './Example';

src/__tests__/output/ComplexExample.validator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* tslint:disable */
2+
// generated by typescript-json-validator
13
import Ajv = require('ajv');
24
import {MyEnum, TypeA, TypeB, RequestA, RequestB} from '../../ComplexExample';
35
import {inspect} from 'util';

src/printValidator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export function printTypeCollectionValidator(
2323
return isKoaType(schema.definitions && schema.definitions[typeName]);
2424
});
2525
return [
26+
t.TSLINT_DISABLE,
27+
t.GENERATED_COMMENT,
2628
t.IMPORT_AJV,
2729
t.importNamedTypes(symbols, relativePath),
2830
...(koaTypes.length ? [t.IMPORT_INSPECT, t.DECLARE_KOA_CONTEXT] : []),
@@ -50,6 +52,8 @@ export function printSingleTypeValidator(
5052
throw new Error('temp');
5153
}
5254
return [
55+
t.TSLINT_DISABLE,
56+
t.GENERATED_COMMENT,
5357
t.IMPORT_INSPECT,
5458
t.IMPORT_AJV,
5559
t.importType(typeName, relativePath, {isNamedExport}),

src/template.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import Ajv = require('ajv');
22
import stringify = require('json-stable-stringify');
33
import * as TJS from 'typescript-json-schema';
44

5-
export type GENERATED_COMMENT = `// generated by typescript-json-validator`;
5+
export const TSLINT_DISABLE = `/* tslint:disable */`;
6+
export const GENERATED_COMMENT = `// generated by typescript-json-validator`;
67

78
export const IMPORT_INSPECT = `import {inspect} from 'util';`;
89
export const IMPORT_AJV = `import Ajv = require('ajv');`;

0 commit comments

Comments
 (0)