0.1.6 • Published 3 years ago
@lough/eslint-config v0.1.6
@lough/eslint-config
Eslint extends configuration.
Install
npm i @lough/eslint-config -Dor
yarn add @lough/eslint-config -DUsage
以下为手动安装步骤,自动安装可使用 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 ./"
}
}