Skip to content

Commit 86daceb

Browse files
fix: disable type checking in generated files
1 parent 52badd5 commit 86daceb

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ module.exports = {
33
rules: {
44
"jest/no-deprecated-functions": "off", // we're not using Jest
55
"prettier/prettier": "off", // we're not concerned with code style
6+
"@typescript-eslint/ban-ts-comment": "off", // we need ts comment in generated files to disable type checking of files for consumers
67
},
78
};

examples/proto/gen/typescript/einride/example/freight/v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Code generated by protoc-gen-typescript-http. DO NOT EDIT.
22
/* eslint-disable camelcase */
3+
// @ts-nocheck
34

45
// A shipment represents transportation of goods between an origin
56
// [site][einride.example.freight.v1.Site] and a destination

examples/proto/gen/typescript/einride/example/syntax/v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Code generated by protoc-gen-typescript-http. DO NOT EDIT.
22
/* eslint-disable camelcase */
3+
// @ts-nocheck
34

45
// Enum
56
export type Enum =

examples/proto/gen/typescript/einride/example/syntax/v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Code generated by protoc-gen-typescript-http. DO NOT EDIT.
22
/* eslint-disable camelcase */
3+
// @ts-nocheck
34

45
// Message
56
export type Message = {

internal/plugin/packagegen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ func (p packageGenerator) Generate(f *codegen.File) error {
4646
func (p packageGenerator) generateHeader(f *codegen.File) {
4747
f.P("// Code generated by protoc-gen-typescript-http. DO NOT EDIT.")
4848
f.P("/* eslint-disable camelcase */")
49+
f.P("// @ts-nocheck")
4950
f.P()
5051
}

0 commit comments

Comments
 (0)