0.1.6 • Published 1 year ago

@lough/eslint-config v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@lough/eslint-config

Eslint extends configuration.

Install

npm i @lough/eslint-config -D

or

yarn add @lough/eslint-config -D

Usage

以下为手动安装步骤,自动安装可使用 Cli

  • 新建 .eslintrc.js 文件,用于配置 eslint 检测

支持: typescript, react, node, base

module.exports = {
  extends: ['@lough/eslint-config/react']
}
  • 新建 .eslintignore 文件,用于屏蔽 eslint 检测
node_modules
build
dist
  • 打开 package.json 文件,添加 scripts
{
  "scripts": {
    "lint:es": "eslint -c .eslintrc.js --ext .ts,.tsx ./",
    "lint:es-fix": "eslint --fix -c .eslintrc.js --ext .ts,.tsx ./"
  }
}