Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-zls

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-zls

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config

使用方法

npm install --save-dev eslint babel-eslint vue-eslint-parser eslint-plugin-vue eslint-config-zls

如果是使用 vue-cli 创建的旧项目,请先移除掉现有的 eslint 相关依赖再重新安装:

npm remove @vue/cli-plugin-eslint eslint babel-eslint eslint-plugin-vue
npm install @vue/cli-plugin-eslint@next eslint babel-eslint vue-eslint-parser eslint-plugin-vue eslint-config-zls

在你的项目的根目录下创建一个 .eslintrc.js 文件,并将以下内容复制进去:

module.exports = {
  extends: [
    'zls',
    'zls/vue',
  ],
  rules: {
    // 自定义规则
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  },
};

依赖版本:

eslint ^7.11.0
babel-eslint ^10.1.0
vue-eslint-parser ^7.1.1
eslint-plugin-vue ^6.2.2

Keywords

FAQs

Package last updated on 02 Jun 2021

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