Repository: fastify/fastify
File: build/build-validation.js (JavaScript)

Code before:
    console.log(`Saved ${file} file successfully`)
  }
})

const defaultInitOptions = {
  connectionTimeout: 0, // 0 sec
  keepAliveTimeout: 72000, // 72 seconds
  forceCloseConnections: undefined, // keep-alive connections
  maxRequestsPerSocket: 0, // no limit
  requestTimeout: 0, // no limit
  bodyLimit: 1024 * 1024, // 1 MiB
  caseSensitive: true,
  allowUnsafeRegex: false,
  disableRequestLogging: false,
  ignoreTrailingSlash: false,
  ignoreDuplicateSlashes: false,
  maxParamLength: 100,
  onProtoPoisoning: 'error',
  onConstructorPoisoning: 'error',
  pluginTimeout: 10000,
  requestIdHeader: false,
  requestIdLogLabel: 'reqId',
  http2SessionTimeout: 72000, // 72 seconds
  exposeHeadRoutes: true,
  useSemicolonDelimiter: false,
  allowErrorHandlerOverride: true
}

const schema = {
  type: 'object',
  additionalProperties: false,
  properties: {
    connectionTimeout: { type: 'integer', default: defaultInitOptions.connectionTimeout },
    keepAliveTimeout: { type: 'integer', default: defaultInitOptions.keepAliveTimeout },
    forceCloseConnections: {
      oneOf: [
        {
          type: 'string',
          pattern: 'idle'
        },
        {
          type: 'boolean'
        }
      ]
    },
    maxRequestsPerSocket: { type: 'integer', default: defaultInitOptions.maxRequestsPerSocket, nullable: true },
    requestTimeout: { type: 'integer', default: defaultInitOptions.requestTimeout },
    bodyLimit: { type: 'integer', default: defaultInitOptions.bodyLimit },
    caseSensitive: { type: 'boolean', default: defaultInitOptions.caseSensitive },
    allowUnsafeRegex: { type: 'boolean', default: defaultInitOptions.allowUnsafeRegex },
    http2: { type: 'boolean' },

Review comment (suggestion):
> What is that code? Is there a specific syntax to use?

just a TODO

```suggestion
  allowErrorHandlerOverride: true // TODO: set to false in v6
```

Code after:
    console.log(`Saved ${file} file successfully`)
  }
})

const defaultInitOptions = {
  connectionTimeout: 0, // 0 sec
  keepAliveTimeout: 72000, // 72 seconds
  forceCloseConnections: undefined, // keep-alive connections
  maxRequestsPerSocket: 0, // no limit
  requestTimeout: 0, // no limit
  bodyLimit: 1024 * 1024, // 1 MiB
  caseSensitive: true,
  allowUnsafeRegex: false,
  disableRequestLogging: false,
  ignoreTrailingSlash: false,
  ignoreDuplicateSlashes: false,
  maxParamLength: 100,
  onProtoPoisoning: 'error',
  onConstructorPoisoning: 'error',
  pluginTimeout: 10000,
  requestIdHeader: false,
  requestIdLogLabel: 'reqId',
  http2SessionTimeout: 72000, // 72 seconds
  exposeHeadRoutes: true,
  useSemicolonDelimiter: false,
  allowErrorHandlerOverride: true // TODO: set to false in v6
}

const schema = {
  type: 'object',
  additionalProperties: false,
  properties: {
    connectionTimeout: { type: 'integer', default: defaultInitOptions.connectionTimeout },
    keepAliveTimeout: { type: 'integer', default: defaultInitOptions.keepAliveTimeout },
    forceCloseConnections: {
      oneOf: [
        {
          type: 'string',
          pattern: 'idle'
        },
        {
          type: 'boolean'
        }
      ]
    },
    maxRequestsPerSocket: { type: 'integer', default: defaultInitOptions.maxRequestsPerSocket, nullable: true },
    requestTimeout: { type: 'integer', default: defaultInitOptions.requestTimeout },
    bodyLimit: { type: 'integer', default: defaultInitOptions.bodyLimit },
    caseSensitive: { type: 'boolean', default: defaultInitOptions.caseSensitive },
    allowUnsafeRegex: { type: 'boolean', default: defaultInitOptions.allowUnsafeRegex },
    http2: { type: 'boolean' },