Skip to content

Commit 0c9707f

Browse files
committed
Add options.plugins schema validation: CR changes on wording
1 parent 0677c6e commit 0c9707f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

schemas/webpackOptionsSchema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"additionalProperties": false,
33
"definitions": {
44
"common.pluginFunction": {
5-
"description": "Compiler or Resolver Plugin instance of Function",
5+
"description": "Function acting as plugin",
66
"instanceof": "Function",
77
"properties": {
88
"apply": {
@@ -16,7 +16,7 @@
1616
]
1717
},
1818
"common.pluginObject": {
19-
"description": "Compiler or Resolver Plugin instance of Function",
19+
"description": "Plugin instance",
2020
"type": "object",
2121
"properties": {
2222
"apply": {

test/Validation.test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ describe("Validation", () => {
269269
" -> Plugin of type object or instanceof Function",
270270
" Details:",
271271
" * configuration.plugins[0] should be an object.",
272-
" -> Compiler or Resolver Plugin instance of Function",
272+
" -> Plugin instance",
273273
" * configuration.plugins[0] should be an instance of function",
274-
" -> Compiler or Resolver Plugin instance of Function"
274+
" -> Function acting as plugin"
275275
]
276276
}, {
277277
name: "Invalid plugin provided: array",
@@ -287,9 +287,9 @@ describe("Validation", () => {
287287
" -> Plugin of type object or instanceof Function",
288288
" Details:",
289289
" * configuration.plugins[0] should be an object.",
290-
" -> Compiler or Resolver Plugin instance of Function",
290+
" -> Plugin instance",
291291
" * configuration.plugins[0] should be an instance of function",
292-
" -> Compiler or Resolver Plugin instance of Function"
292+
" -> Function acting as plugin"
293293
]
294294
}, {
295295
name: "Invalid plugin provided: string",
@@ -303,9 +303,9 @@ describe("Validation", () => {
303303
" -> Plugin of type object or instanceof Function",
304304
" Details:",
305305
" * configuration.plugins[0] should be an object.",
306-
" -> Compiler or Resolver Plugin instance of Function",
306+
" -> Plugin instance",
307307
" * configuration.plugins[0] should be an instance of function",
308-
" -> Compiler or Resolver Plugin instance of Function"
308+
" -> Function acting as plugin"
309309
]
310310
}, {
311311
name: "Invalid plugin provided: int",
@@ -321,16 +321,16 @@ describe("Validation", () => {
321321
" -> Plugin of type object or instanceof Function",
322322
" Details:",
323323
" * configuration.plugins[0] should be an object.",
324-
" -> Compiler or Resolver Plugin instance of Function",
324+
" -> Plugin instance",
325325
" * configuration.plugins[0] should be an instance of function",
326-
" -> Compiler or Resolver Plugin instance of Function"
326+
" -> Function acting as plugin"
327327
]
328328
}, {
329329
name: "Invalid plugin provided: object without apply function",
330330
config: {
331331
entry: "foo.js",
332332
plugins: [
333-
new function() {}
333+
{}
334334
]
335335
},
336336
message: [
@@ -345,7 +345,7 @@ describe("Validation", () => {
345345
" function",
346346
" -> The run point of the plugin, required method.",
347347
" * configuration.plugins[0] should be an instance of function",
348-
" -> Compiler or Resolver Plugin instance of Function"
348+
" -> Function acting as plugin"
349349
]
350350
}];
351351

0 commit comments

Comments
 (0)