Skip to content

Commit

Permalink
fix: update schema to have negatedDescription only for type `boolea…
Browse files Browse the repository at this point in the history
…n` (#4280)
  • Loading branch information
snitin315 committed Feb 15, 2022
1 parent 007104e commit fcf8e8e
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 232 deletions.
3 changes: 0 additions & 3 deletions bin/cli-flags.js
Expand Up @@ -166,8 +166,6 @@ module.exports = {
multiple: false,
description:
"Tells dev-server the number of times it should try to reconnect the client.",
negatedDescription:
"Tells dev-server to not to try to reconnect the client.",
path: "client.reconnect",
},
],
Expand Down Expand Up @@ -384,7 +382,6 @@ module.exports = {
values: ["only"],
multiple: false,
description: "Enables Hot Module Replacement.",
negatedDescription: "Disables Hot Module Replacement.",
path: "hot",
},
],
Expand Down
46 changes: 23 additions & 23 deletions lib/options.json
Expand Up @@ -28,7 +28,10 @@
"Bonjour": {
"anyOf": [
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disallows to broadcasts dev server via ZeroConf networking on start."
}
},
{
"type": "object",
Expand All @@ -37,10 +40,7 @@
}
],
"description": "Allows to broadcasts dev server via ZeroConf networking on start.",
"link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour",
"cli": {
"negatedDescription": "Disallows to broadcasts dev server via ZeroConf networking on start."
}
"link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour"
},
"Client": {
"description": "Allows to specify options for client script in the browser or disable client script.",
Expand Down Expand Up @@ -122,16 +122,16 @@
"link": "https://webpack.js.org/configuration/dev-server/#reconnect",
"anyOf": [
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Tells dev-server to not to try to reconnect the client."
}
},
{
"type": "number",
"minimum": 0
}
],
"cli": {
"negatedDescription": "Tells dev-server to not to try to reconnect the client."
}
]
},
"ClientWebSocketTransport": {
"anyOf": [
Expand Down Expand Up @@ -481,17 +481,17 @@
"Hot": {
"anyOf": [
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disables Hot Module Replacement."
}
},
{
"enum": ["only"]
}
],
"description": "Enables Hot Module Replacement.",
"link": "https://webpack.js.org/configuration/dev-server/#devserverhot",
"cli": {
"negatedDescription": "Disables Hot Module Replacement."
}
"link": "https://webpack.js.org/configuration/dev-server/#devserverhot"
},
"IPC": {
"anyOf": [
Expand Down Expand Up @@ -968,23 +968,26 @@
"serveIndex": {
"anyOf": [
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Does not tell dev server to use serveIndex middleware."
}
},
{
"type": "object",
"additionalProperties": true
}
],
"description": "Tells dev server to use serveIndex middleware when enabled.",
"cli": {
"negatedDescription": "Does not tell dev server to use serveIndex middleware."
},
"link": "https://webpack.js.org/configuration/dev-server/#serveindex"
},
"watch": {
"anyOf": [
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Does not watch for files in static content directory."
}
},
{
"type": "object",
Expand All @@ -993,9 +996,6 @@
}
],
"description": "Watches for files in static content directory.",
"cli": {
"negatedDescription": "Does not watch for files in static content directory."
},
"link": "https://webpack.js.org/configuration/dev-server/#watch"
}
}
Expand Down
23 changes: 15 additions & 8 deletions types/bin/cli-flags.d.ts
Expand Up @@ -114,13 +114,21 @@ declare const _exports: {
multiple: boolean;
};
"client-reconnect": {
configs: {
type: string;
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}[];
configs: (
| {
type: string;
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}
| {
type: string;
multiple: boolean;
description: string;
path: string;
}
)[];
description: string;
simpleType: string;
multiple: boolean;
Expand Down Expand Up @@ -289,7 +297,6 @@ declare const _exports: {
values: string[];
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}
)[];
Expand Down

0 comments on commit fcf8e8e

Please sign in to comment.