Socket
Socket
Sign inDemoInstall

pug-lint-wb-loader

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-lint-wb-loader

用于pug-lint的loader


Version published
Weekly downloads
7
increased by133.33%
Maintainers
1
Weekly downloads
 
Created
Source

pug-lint-wb-loader

继承自pug-lint-loader,优化了报错提示。用于webpack的loader

Install

$ npm install pug-lint-wb-loader --save-dev

Usage

在webpack的配置文件中写如下配置

module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /\.(pug|jade)$/,
        exclude: /node_modules/,
        loader: "pug-lint-wb-loader",
        options: require('./.pug-lintrc.js'),
        enforce: "pre"
      },
    ],
  },
  // ...
}

To be safe, you should use enforce: "pre" section to check source files, not modified by other loaders (like pug-loader)

Options

You can pass puglint options using standard webpack loader options.

Errors or Warning?

You can still force this behavior by using emitError:

emitError (default: true)

Loader will always return errors if this option is set to true.

module.exports = {
  entry: "...",
  module: {
    rules: [
      {
        test: /\.(pug|jade)$/,
        exclude: /node_modules/,
        loader: "pug-lint-wb-loader",
        options: Object.assign({
          emitError: true,
        }, require('./.pug-lintrc.js'))
      },
    ],
  },
}

License

MIT License

Keywords

FAQs

Package last updated on 14 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc