How to use postcss-reporter - 10 common examples

To help you get started, we’ve selected a few postcss-reporter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sebastian-software / edgestack / src / webpack / PostCSSConfig.js View on Github external
// Sass like @warn for PostCSS. Disabling internal usage of "postcss-reporter".
    // https://github.com/ben-eb/postcss-at-warn
    warn({
      silent: true
    }),

    // Parse CSS and add vendor prefixes to rules by Can I Use
    // https://github.com/postcss/autoprefixer
    autoprefixer(),

    // Adding the best CSS compressor to the chain
    csso(),

    // Log PostCSS messages to the console
    reporter({
      clearReportedMessages: true
    })
  ]
}
github dexteryy / Project-WebCube / packages / webcube / configs / webpack.config.babel.js View on Github external
// https://www.npmjs.com/package/postcss-normalize
          postcssNormalize(),
          // https://www.npmjs.com/package/postcss-will-change
          ...(tool.postCss.disableGpuHack ? [] : [postcssWillChange()]),
          // https://www.npmjs.com/package/postcss-brand-colors
          brandColor(),
          // https://www.npmjs.com/package/postcss-nippon-color
          nipponColor(),
          // https://www.npmjs.com/package/postcss-google-color
          googleColor(),
          // https://github.com/postcss/autoprefixer
          autoprefixer({
            ...tool.postCss.autoprefixer,
            browsers: tool.browserslist,
          }),
          postCssReporter(tool.postCss.reporter),
          ...tool.postCss.plugins,
        ],
        sourceMap: !isProductionEnv,
github wprig / wprig / gulp / styles.js View on Github external
}),
		calc({
			preserve: false
		}),
		cssnano(),
	];

	// Skip minifying files if we aren't building for
	// production and debug is enabled
	if( config.dev.debug.styles && ! isProd ) {
		postcssPlugins.pop();
	}

	// Report messages from other postcss plugins
	postcssPlugins.push(
		reporter({ clearReportedMessages: true })
	);

	// Return a single stream containing all the
	// after replacement functionality
	return pipeline.obj([
		gulpPlugins.postcss([
			AtImport({
				path: [paths.styles.srcDir],
				plugins: [
					stylelint(),
				]
			})
		]),
		gulpPlugins.postcss(postcssPlugins),
		gulpPlugins.if(
            config.dev.debug.styles,
github wprig / wprig / gulp / editorStyles.js View on Github external
}),
		calc({
			preserve: false
		}),
		cssnano(),
	];

	// Skip minifying files if we aren't building for
	// production and debug is enabled
	if( config.dev.debug.styles && ! isProd ) {
		postcssPlugins.pop();
	}

	// Report messages from other postcss plugins
	postcssPlugins.push(
		reporter({ clearReportedMessages: true })
	);

	// Return a single stream containing all the
	// after replacement functionality
	return pipeline.obj([
		gulpPlugins.postcss([
			AtImport({
				path: [paths.styles.srcDir],
				plugins: [
					stylelint(),
				]
			})
		]),
		gulpPlugins.postcss(postcssPlugins),
		gulpPlugins.if(
            config.dev.debug.styles,
github stylelint / stylelint / lib / formatters / stringFormatter.js View on Github external
const cleanedMessages = orderedMessages.map(message => {
    const location = utils.getLocation(message);
    const severity = message.severity;
    const row = [
      location.line || "",
      location.column || "",
      symbols[severity]
        ? chalk[levelColors[severity]](symbols[severity])
        : severity,
      message.text
        // Remove all control characters (newline, tab and etc)
        .replace(/[\x01-\x1A]+/g, " ") // eslint-disable-line no-control-regex
        .replace(/\.$/, "")
        .replace(
          new RegExp(_.escapeRegExp("(" + message.rule + ")") + "$"),
          ""
        ),
      chalk.dim(message.rule || "")
github rhinogram / rhinostyle / config / linter.js View on Github external
export default function linter() {
  return gulp.src('./src/less/**/*.less')
    .pipe($.postcss(
      [
        stylelint(),
        reporter({ clearMessages: true }),
      ],
      {
        syntax: less,
      },
    ))
    .pipe($.duration('linting styles'));
}
github Kunstmaan / KunstmaanBundlesCMS / src / Kunstmaan / GeneratorBundle / Resources / SensioGeneratorBundle / skeleton / layout / groundcontrol / bin / tasks / stylelint.js View on Github external
return function stylelint() {
        return gulp.src(src)
            .pipe(postcss([
                stylelintPlugin(),
                reporter({
                    clearReportedMessages: true,
                }),
            ], {
                syntax: scssSyntax,
            }));
    };
}
github postcss / postcss-devtools / src / index.js View on Github external
const message = getMessage(proc.postcssPlugin, completed, precise);
                        res.messages.push(message);
                        summaryResults = updateSummary(summaryResults, message, {precise, silent});
                        resolve();
                    }
                });
            };

            wrappedPlugin.postcssPlugin = proc.postcssPlugin;
            wrappedPlugin.postcssVersion = proc.postcssVersion;

            return wrappedPlugin;
        });

        if (!silent) {
            result.processor.use(reporter({formatter: formatter}));
        }
    };
github swissquote / crafty / packages / crafty-preset-postcss / src / lint_reporter.js View on Github external
const sourceGroupedMessages = messagesToLog.reduce((result, message) => {
      const key = util.getLocation(message).file || resultSource;
      if (!message.severity) {
        message.severity = message.type || "warning";
      }

      if (hasOwnProperty.call(result, key)) {
        result[key].push(message);
      } else {
        result[key] = [message];
      }
      return result;
    }, {});

postcss-reporter

Log PostCSS messages in the console

MIT
Latest version published 3 months ago

Package Health Score

83 / 100
Full package analysis

Similar packages