New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

plugin-define

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plugin-define

wepy eslint

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

wepy eslint 插件

安装

npm install @wepy/plugin-define --save-dev

配置wepy.config.js

const definePlugin = require('@wepy/plugin-define');

module.exports = {
  plugins: [
    definePlugin({
      // options
    })
  ]
};

参数说明

你提供的配置选项 options 将传递给 CLIEngine处理,有关 options 的更多详细信息,请参阅eslint文档

quiet (默认值: false)

如果此选项设置为true,插件将仅处理和报告错误,忽略警告

const eslint = require('@wepy/plugin-eslint');

module.exports = {
  plugins: [
    eslint({
      quiet: true
    })
  ]
};
fix (default: false)

启用 ESLint 自动修复功能

注意:此选项将更改源文件

output (default: true)

启用 ESLint

eslintPath (default: eslint)

用于 lintingESLint 实例的路径

formatter (default: eslint stylish formatter)

用于格式化 ESLint 输出,选项值接收字符串或者函数

const eslint = require('@wepy/plugin-eslint');

module.exports = {
  plugins: [
    eslint({
      // default value
      formatter: require('eslint/lib/formatters/stylish'),

      // community formatter
      formatter: require('eslint-friendly-formatter'),

      // custom formatter
      formatter: function(results) {
        // `results` format is available here
        // http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles()

        // you should return a string
        // DO NOT USE console.*() directly !
        return 'OUTPUT'
      }
    })
  ]
};

Keywords

FAQs

Package last updated on 22 Jan 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