1.0.14 • Published 5 years ago
eslint-config-breezr v1.0.14
eslint-config-breezr
INSTALL
npm i -D eslint babel-eslint eslint-config-breezrUSE
.eslintrc
在你的项目根目录下新建 .eslintrc,内容如下:
es5 项目
{
"extends": [
"eslint-config-breezr/es5"
]
}es6 项目
{
"extends": [
"eslint-config-breezr/es6"
]
}react 项目
{
"parser": "babel-eslint",
"extends": [
"eslint-config-breezr/react"
]
}需要在你的项目下安装 babel-eslint
npm i -D babel-eslintts / tsx项目
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint-config-breezr/ts"
]
}{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint-config-breezr/tsx"
]
}需要在你的项目下安装 @typescript-eslint/parser
npm i -D @typescript-eslint/parser.eslintignore
# common
.*/
# generated
build/
coverage/
lib/
dist/npm script
在 package.json 里的 "scripts" 里添加 lint 命令:
{
"script": {
"lint": "eslint src/"
}
}在项目根目录下执行 yarn lint 或 npm run lint 查看结果。
IDE Support
1.0.14
5 years ago
1.0.0-rc.7
6 years ago
1.0.0-rc.6
6 years ago
1.0.0-rc.5
6 years ago
1.0.0-rc.4
6 years ago
1.0.0-rc.1
6 years ago