How to use stylelint-webpack-plugin - 3 common examples

To help you get started, we’ve selected a few stylelint-webpack-plugin 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 wemake-services / wemake-vue-template / template / nuxt.config.ts View on Github external
// This line allows us to use `@import "~/scss/..."` in our app:
        config.resolve.alias['/scss'] = SCSS_DIR
      }

      if (isDev && isClient && config.module) {
        // Enabling eslint:
        config.module.rules.push({
          'enforce': 'pre',
          'test': /\.(js|ts|vue)$/u,
          'loader': 'eslint-loader',
          'exclude': /(node_modules)/u,
        })

        if (config.plugins) {
          // Enabling stylelint:
          config.plugins.push(new StylelintWebpackPlugin({
            'files': 'client/**/*.{vue,scss,css}',
          }))
        }
      }
    },
  },
github intraxia / wp-gistpen / .beaverrc.js View on Github external
config.module.rules.push({
      test: /\.lazy\.(scss|css)$/,
      use: [
        {
          loader: 'style-loader',
          options: {
            injectType: 'lazyStyleTag',
          },
        },
        'css-loader',
        'sass-loader',
      ],
    });

    config.plugins.push(
      new StyleLintPlugin({
        syntax: 'scss',
        context: path.join(__dirname, dir),
      }),
    );
    config.plugins.push(
      new WebpackNotifierPlugin({
        alwaysNotify: true,
        emoji: true,
      }),
    );
    config.plugins.push(new PrismLanguageGenerationPlugin());
    config.plugins.push(
      new DependencyExtractionWebpackPlugin({
        outputFormat: 'json',
        combineAssets: true,
        combinedOutputFile: `wp-assets${isProd(state) ? '.min' : ''}.json`,
github cantonjs / wxapp-boilerplate / webpack.config.babel.js View on Github external
new EnvironmentPlugin({
				NODE_ENV: 'development',
			}),
			new DefinePlugin({
				__DEV__: isDev,
				__WECHAT__: isWechat,
				__ALIPAY__: isAlipay,
				wx: isWechat ? 'wx' : 'my',
				my: isWechat ? 'wx' : 'my',
			}),
			new WXAppWebpackPlugin({
				clear: !isDev,
			}),
			new optimize.ModuleConcatenationPlugin(),
			new IgnorePlugin(/vertx/),
			shouldLint && new StylelintPlugin(),
			min && new MinifyPlugin(),
			new CopyPlugin(copyPatterns, { context: srcDir }),
		].filter(Boolean),
		devtool: isDev ? 'source-map' : false,
		resolve: {
			modules: [resolve(__dirname, 'src'), 'node_modules'],
		},
		watchOptions: {
			ignored: /dist|manifest/,
			aggregateTimeout: 300,
		},
	};
};

stylelint-webpack-plugin

A Stylelint plugin for webpack

MIT
Latest version published 6 months ago

Package Health Score

79 / 100
Full package analysis

Popular stylelint-webpack-plugin functions