diff --git a/src/options.json b/src/options.json index e4546157..956cd39c 100644 --- a/src/options.json +++ b/src/options.json @@ -11,6 +11,12 @@ "type": "object" } }, + "errorMessage": { + "properties": { + "ctx": "should be {Object} (https://github.com/postcss/postcss-loader#context-ctx)", + "path": "should be {String} (https://github.com/postcss/postcss-loader#path)" + } + }, "additionalProperties": false }, "exec": { @@ -39,5 +45,17 @@ "type": [ "string", "boolean" ] } }, + "errorMessage": { + "properties": { + "exec": "should be {Boolean} (https://github.com/postcss/postcss-loader#exec)", + "ident": "should be {String} (https://github.com/postcss/postcss-loader#plugins)", + "config": "should be {Object} (https://github.com/postcss/postcss-loader#config)", + "parser": "should be {String|Object} (https://github.com/postcss/postcss-loader#parser)", + "syntax": "should be {String|Object} (https://github.com/postcss/postcss-loader#syntax)", + "stringifier": "should be {String|Object} (https://github.com/postcss/postcss-loader#stringifier)", + "plugins": "should be {Array|Object|Function} (https://github.com/postcss/postcss-loader#plugins)", + "sourceMap": "should be {String|Boolean} (https://github.com/postcss/postcss-loader#sourcemap)" + } + }, "additionalProperties": true } diff --git a/test/__snapshots__/Errors.test.js.snap b/test/__snapshots__/Errors.test.js.snap index 6db3e25c..dedd2684 100644 --- a/test/__snapshots__/Errors.test.js.snap +++ b/test/__snapshots__/Errors.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Errors Syntax Error 1`] = ` -"Syntax Error +"Syntax Error (1:3) Unexpected separator in property @@ -14,6 +14,8 @@ exports[`Errors Syntax Error 1`] = ` exports[`Errors Validation Error 1`] = ` "ValidationError: PostCSS Loader Invalid Options -options.sourceMap should be string,boolean -" +options.sourceMap should be {String|Boolean} (https://github.com/postcss/postcss-loader#sourcemap) + + at validateOptions (/Users/Cini/Github/webpack/loaders/postcss/node_modules/@webpack-utilities/schema/src/validateOptions.js:25:11) + at Object.loader (/Users/Cini/Github/webpack/loaders/postcss/src/index.js:44:3)" `;