1. eslint-config-hfex
eslint检测工具
eslint-config-hfex
Package: eslint-config-hfex
Created by: UzumakiHan
Last modified: Tue, 06 Jun 2023 14:57:01 GMT
Version: 1.1.0
License: ISC
Downloads: 6
Repository: https://github.com/UzumakiHan/hfex-eslint-config

Install

npm install eslint-config-hfex
yarn add eslint-config-hfex

eslint-config-hfex

前端 eslint 静态语法检测规范插件。

目前提供如下两套规则

  • recommended(vue2 推荐配置,如果没有特殊需求都使用这套)
  • vue3-recommended(vue3 推荐配置,如果没有特殊需求都使用这套)

使用

安装eslint-config-hfex

npm i eslint-config-hfex eslint -D

package.json中添加

"scripts":{
    "lint": "eslint src/**/*.{ts,js,json,vue,jsx,tsx} --fix",
}
"eslintConfig": {
    "root": true,
    "extends": [
      "hfex"
    ]
},

测试和语法检测

 npm run lint

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin