Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@dzo/eslint-config-esdz

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dzo/eslint-config-esdz

ESLint 基础配置,集成react,vue,ts的规范。

latest
npmnpm
Version
0.0.4
Version published
Maintainers
6
Created
Source

ESLint 规范

个人前端 ESLint 规范,目前支持vue|react

安装

npm install @dzo/eslint-config-esdz -D

# OR
yarn add @dzo/eslint-config-esdz --dev

使用

在你的工程根目录下创建一个.eslintrc.js配置文件

配置如下:

  • 基础配置
module.exports = {
  extends: ['@dzo/esdz']
}
  • vue
module.exports = {
  extends: ['@dzo/esdz/vue']
}
  • react
module.exports = {
  extends: ['@dzo/esdz/react']
}

:::caution 如果项目之前安装过 ESLint 相关的包,建议卸载,避免引入不必要的包。如eslinteslint-plugin-vue@babel/eslint-parser@typescript-eslint/eslint-plugin@typescript-eslint/parser@vue/eslint-config-typescripteslint-config-react-appeslint-plugin-import等,直接在 package.json 搜索eslint,相关的包全部卸载 :::

版本更新 0.0.2 修改"semi": ["error", "always"],必须分号结束 0.0.3 新增prettier.js配置文件 0.0.4 修改space-before-function-paren配置

Keywords

eslint-config

FAQs

Package last updated on 22 Feb 2022

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