1. eslint-config-jr
ellint配置,个人前端代码检查规范
eslint-config-jr
Package: eslint-config-jr
Created by: diamont1001
Last modified: Fri, 17 Jun 2022 19:25:14 GMT
Version: 1.0.4
License: MIT
Downloads: 11
Repository: https://github.com/diamont1001/eslint-config

Install

npm install eslint-config-jr
yarn add eslint-config-jr

eslint-config-jr

ellint配置,个人前端代码检查规范

使用说明

1. 插件安装

npm install eslint eslint-config-jr

2. 建立配置文件 .eslintrc

项目根目录下建立 .eslintrc 文件,并引入 eslint-config-jr

// .eslintrc
{
    "extends": [
    	"jr"
    ],
    "rules": {
        // your rules here
    }
}

3. 增加脚本

package.json增加脚本lint:

// package.json
"scripts": {
	"lint": "./node_modules/.bin/eslint *.js" // 配置要检查代码的文件/目录
}

4. 检查代码

开发完成后,一般打包或者发布前需要检查代码

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