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

eslint-ignore

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

eslint-ignore

eslintIgnore webpack eslint-loader

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslintIgnore

eslintIgnore webpack eslint-loader


项目中推广eslint规范,在使用发现了一个问题; eslintignore文件只能在 eslint xxx 命令行形式中生效; webpack eslint-loader则不可以,因为webpack loader中规定了 忽略文件要通过exclude方式。

故写了一个简单的loader来读取eslintignore的内容,并且以数字的形式返回给exclude。 使用方式如下:


    preLoaders: [{
            test: /\w+[^Tpl]\.js$/,
            loader: 'eslint-loader',
            include: path.resolve(__dirname, "../js"),
            exclude: new EslintIgnore()
            /*exclude:[ // 排除第三方库,插件之类的
                path.resolve(__dirname, "../js/lib"),
                path.resolve(__dirname, "../js/com/thunderAgent.js"),
                path.resolve(__dirname, "../js/com/pv_click_v2.mini.js"),
                path.resolve(__dirname, "../js/util/debug.js")
            ]*/
        }]

Keywords

FAQs

Package last updated on 01 Aug 2017

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