@@ -31,35 +31,35 @@ const {
3131
3232/**
3333 * @typedef {Record<string, unknown> } CssNanoOptions
34- * @property {string= } configFile - Configuration file path
35- * @property {string | [string, Record<string, unknown>] | undefined= } preset - CSS nano preset
34+ * @property {string= } configFile Configuration file path
35+ * @property {string | [string, Record<string, unknown>] | undefined= } preset CSS nano preset
3636 */
3737
3838/** @typedef {Error & { plugin?: string, text?: string, source?: string } | string } Warning */
3939
4040/**
4141 * @typedef {object } WarningObject
42- * @property {string } message - Warning message
43- * @property {string= } plugin - Plugin name
44- * @property {string= } text - Warning text
45- * @property {number= } line - Line number
46- * @property {number= } column - Column number
42+ * @property {string } message Warning message
43+ * @property {string= } plugin Plugin name
44+ * @property {string= } text Warning text
45+ * @property {number= } line Line number
46+ * @property {number= } column Column number
4747 */
4848
4949/**
5050 * @typedef {object } ErrorObject
51- * @property {string } message - Error message
52- * @property {number= } line - Line number
53- * @property {number= } column - Column number
54- * @property {string= } stack - Error stack trace
51+ * @property {string } message Error message
52+ * @property {number= } line Line number
53+ * @property {number= } column Column number
54+ * @property {string= } stack Error stack trace
5555 */
5656
5757/**
5858 * @typedef {object } MinimizedResult
59- * @property {string } code - Minimized code
60- * @property {RawSourceMap= } map - Source map
61- * @property {Array<Error | ErrorObject| string>= } errors - Errors
62- * @property {Array<Warning | WarningObject | string>= } warnings - Warnings
59+ * @property {string } code Minimized code
60+ * @property {RawSourceMap= } map Source map
61+ * @property {Array<Error | ErrorObject| string>= } errors Errors
62+ * @property {Array<Warning | WarningObject | string>= } warnings Warnings
6363 */
6464
6565/**
@@ -91,7 +91,7 @@ const {
9191
9292/**
9393 * @typedef {object } MinimizeFunctionHelpers
94- * @property {() => boolean | undefined= } supportsWorkerThreads - Check if worker threads are supported
94+ * @property {() => boolean | undefined= } supportsWorkerThreads Check if worker threads are supported
9595 */
9696
9797/**
@@ -102,10 +102,10 @@ const {
102102/**
103103 * @template T
104104 * @typedef {object } InternalOptions
105- * @property {string } name - Name
106- * @property {string } input - Input
107- * @property {RawSourceMap | undefined } inputSourceMap - Input source map
108- * @property {{ implementation: MinimizerImplementation<T>, options: MinimizerOptions<T> } } minimizer - Minimizer
105+ * @property {string } name Name
106+ * @property {string } input Input
107+ * @property {RawSourceMap | undefined } inputSourceMap Input source map
108+ * @property {{ implementation: MinimizerImplementation<T>, options: MinimizerOptions<T> } } minimizer Minimizer
109109 */
110110
111111/**
@@ -124,11 +124,11 @@ const {
124124
125125/**
126126 * @typedef {object } BasePluginOptions
127- * @property {Rule= } test - Test rule
128- * @property {Rule= } include - Include rule
129- * @property {Rule= } exclude - Exclude rule
130- * @property {WarningsFilter= } warningsFilter - Warnings filter
131- * @property {Parallel= } parallel - Parallel option
127+ * @property {Rule= } test Test rule
128+ * @property {Rule= } include Include rule
129+ * @property {Rule= } exclude Exclude rule
130+ * @property {WarningsFilter= } warningsFilter Warnings filter
131+ * @property {Parallel= } parallel Parallel option
132132 */
133133
134134/**
@@ -202,7 +202,7 @@ class CssMinimizerPlugin {
202202 /**
203203 * @private
204204 * @param {unknown } input Input to check
205- * @returns {boolean } - Whether input is a source map
205+ * @returns {boolean } Whether input is a source map
206206 */
207207 static isSourceMap ( input ) {
208208 // All required options for `new SourceMapConsumer(...options)`
@@ -226,7 +226,7 @@ class CssMinimizerPlugin {
226226 * @param {WarningsFilter= } warningsFilter Warnings filter
227227 * @param {TraceMap= } sourceMap Source map
228228 * @param {Compilation["requestShortener"]= } requestShortener Request shortener
229- * @returns {Error & { hideStack?: boolean, file?: string } | undefined } - Built warning
229+ * @returns {Error & { hideStack?: boolean, file?: string } | undefined } Built warning
230230 */
231231 static buildWarning (
232232 warning ,
@@ -309,7 +309,7 @@ class CssMinimizerPlugin {
309309 * @param {string } file File name
310310 * @param {TraceMap= } sourceMap Source map
311311 * @param {Compilation["requestShortener"]= } requestShortener Request shortener
312- * @returns {Error } - Built error
312+ * @returns {Error } Built error
313313 */
314314 static buildError ( error , file , sourceMap , requestShortener ) {
315315 /**
@@ -384,15 +384,17 @@ class CssMinimizerPlugin {
384384 /**
385385 * @private
386386 * @param {Parallel } parallel Parallel option
387- * @returns {number } - Available number of cores
387+ * @returns {number } Available number of cores
388388 */
389389 static getAvailableNumberOfCores ( parallel ) {
390390 // In some cases cpus() returns undefined
391391 // https://github.com/nodejs/node/issues/19022
392392
393393 const cpus =
394+ // eslint-disable-next-line n/no-unsupported-features/node-builtins
394395 typeof os . availableParallelism === "function"
395- ? { length : os . availableParallelism ( ) }
396+ ? // eslint-disable-next-line n/no-unsupported-features/node-builtins
397+ { length : os . availableParallelism ( ) }
396398 : os . cpus ( ) || { length : 1 } ;
397399
398400 return parallel === true || typeof parallel === "undefined"
@@ -404,7 +406,7 @@ class CssMinimizerPlugin {
404406 * @private
405407 * @template T
406408 * @param {BasicMinimizerImplementation<T> & MinimizeFunctionHelpers } implementation Implementation
407- * @returns {boolean } - Whether worker threads are supported
409+ * @returns {boolean } Whether worker threads are supported
408410 */
409411 static isSupportsWorkerThreads ( implementation ) {
410412 return typeof implementation . supportsWorkerThreads !== "undefined"
@@ -418,7 +420,7 @@ class CssMinimizerPlugin {
418420 * @param {Compilation } compilation Compilation
419421 * @param {Record<string, import("webpack").sources.Source> } assets Assets
420422 * @param {{availableNumberOfCores: number} } optimizeOptions Optimize options
421- * @returns {Promise<void> } - Promise
423+ * @returns {Promise<void> } Promise
422424 */
423425 async optimize ( compiler , compilation , assets , optimizeOptions ) {
424426 const cache = compilation . getCache ( "CssMinimizerWebpackPlugin" ) ;
@@ -709,7 +711,7 @@ class CssMinimizerPlugin {
709711
710712 /**
711713 * @param {Compiler } compiler Compiler
712- * @returns {void } - Void
714+ * @returns {void } Void
713715 */
714716 apply ( compiler ) {
715717 const pluginName = this . constructor . name ;
0 commit comments