Skip to content

Commit 9411c72

Browse files
committed
Run ts-standard --fix
1 parent 5afeeff commit 9411c72

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

compiler/run-validations.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
/* global $ argv, path, cd, nothrow */
20+
/* global $ path, cd, nothrow */
2121

2222
'use strict'
2323

@@ -93,7 +93,6 @@ async function run () {
9393
process.exit(1)
9494
}
9595

96-
9796
const isFlightRecorderCloned = await $`[[ -d ${path.join(__dirname, '..', '..', 'clients-flight-recorder')} ]]`.exitCode === 0
9897
if (!isFlightRecorderCloned) {
9998
spinner.text = 'It looks like you didn\'t clone the flight recorder, doing that for you'

compiler/src/dump/extract-routes-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import { insert, Node } from './extract-routes'
2323
test('insertions', t => {
2424
class Args {
2525
name: string
26-
routes: Array<{name: string, path: string}>
26+
routes: Array<{ name: string, path: string }>
2727
expect: Node
2828

29-
constructor (name: string, routes: Array<{name: string, path: string}>, expect: Node) {
29+
constructor (name: string, routes: Array<{ name: string, path: string }>, expect: Node) {
3030
this.name = name
3131
this.routes = routes
3232
this.expect = expect

compiler/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (nodejsMajor !== nvmMajor) {
3939
process.exit(1)
4040
}
4141

42-
let specsFolder: string|undefined = argv.spec
42+
let specsFolder: string | undefined = argv.spec
4343
if (specsFolder !== '' && specsFolder !== undefined) {
4444
// We were given a specification, let's make sure it's a directory.
4545
specsFolder = resolve(specsFolder)
@@ -58,7 +58,7 @@ if (specsFolder !== '' && specsFolder !== undefined) {
5858
}
5959

6060
// It's okay if the output folder doesn't exist initially.
61-
const outputFolder: string|undefined = argv.output
61+
const outputFolder: string | undefined = argv.output
6262
if (outputFolder === '' || outputFolder === undefined) {
6363
console.error('--output must be specified')
6464
process.exit(1)

compiler/src/model/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ export function modelEnumDeclaration (declaration: EnumDeclaration): model.Enum
481481
// names that contains `.` or `-` will be wrapped inside single quotes
482482
const name = m.getName().replace(/'/g, '')
483483
const member: model.EnumMember = {
484-
name: name
484+
name
485485
}
486486
const value = m.getValue()
487487
if (value != null && (typeof value === 'string')) {
@@ -1097,14 +1097,14 @@ export function parseVariantsTag (jsDoc: JSDoc[]): model.Variants | undefined {
10971097
if (type === 'external') {
10981098
return {
10991099
kind: 'external_tag',
1100-
nonExhaustive: nonExhaustive
1100+
nonExhaustive
11011101
}
11021102
}
11031103

11041104
if (type === 'container') {
11051105
return {
11061106
kind: 'container',
1107-
nonExhaustive: nonExhaustive
1107+
nonExhaustive
11081108
}
11091109
}
11101110

@@ -1113,7 +1113,7 @@ export function parseVariantsTag (jsDoc: JSDoc[]): model.Variants | undefined {
11131113
assert(jsDoc, typeof pairs.tag === 'string', 'Internal variant requires a tag definition')
11141114
return {
11151115
kind: 'internal_tag',
1116-
nonExhaustive: nonExhaustive,
1116+
nonExhaustive,
11171117
tag: pairs.tag,
11181118
defaultTag: pairs.default
11191119
}
@@ -1125,7 +1125,7 @@ export function parseVariantsTag (jsDoc: JSDoc[]): model.Variants | undefined {
11251125
const fqn = pairs.untyped.split('.')
11261126
return {
11271127
kind: 'untagged',
1128-
nonExhaustive: nonExhaustive,
1128+
nonExhaustive,
11291129
untypedVariant: {
11301130
namespace: fqn.slice(0, fqn.length - 1).join('.'),
11311131
name: fqn[fqn.length - 1]

compiler/src/steps/validate-model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma
7373

7474
// Current endpoint context. Start with an undefined one for common type definitions
7575
let currentEndpoint: string | undefined
76-
let currentPart: 'request'|'response' = 'request'
76+
let currentPart: 'request' | 'response' = 'request'
7777

7878
function setRootContext (endpoint: string, what: 'request' | 'response'): void {
7979
currentEndpoint = endpoint
@@ -155,7 +155,7 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma
155155
]) {
156156
const typeName = {
157157
namespace: '_builtins',
158-
name: name
158+
name
159159
}
160160
typeDefByName.set(fqn(typeName), {
161161
kind: 'interface',

compiler/src/transform/expand-generics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export function expandGenerics (inputModel: Model, config?: ExpansionConfig): Mo
457457
return {
458458
_info: inputModel._info,
459459
endpoints: inputModel.endpoints,
460-
types: types
460+
types
461461
}
462462
}
463463

0 commit comments

Comments
 (0)