1.1.2 • Published 2 months ago
@eliduty/eslint-config v1.1.2
@eliduty/eslint-config
Prettier 配置。
安装
npm install -D eslint @eliduty/eslint-config
// 或
yarn add -D eslint @eliduty/eslint-config
// 或
pnpm install -D eslint @eliduty/eslint-config
使用
根据项目类型在.eslint.js中添加如下配置
javascript、node项目
{
"extends": ["@eliduty/eslint-config"]
}
然后执行以下命令:
pnpm pkg set scripts.lint:format="eslint --cache --fix **/src/**/*.{html,htm,js,jsx,cjs,mjs}"
或者在package.json的scripts中添加如下配置:
{
"scripts":{
"lint:format":"eslint --cache --fix **/src/**/*.{html,htm,js,jsx,cjs,mjs}"
}
}
TypeScript项目
{
"extends": ["@eliduty/eslint-config/typescript"]
}
然后执行以下命令:
pnpm pkg set scripts.lint:format="eslint --cache --fix **/src/**/*.{html,htm,js,jsx,cjs,mjs,ts,tsx,cts,mts}"
或者在package.json的scripts中添加如下配置:
{
"scripts":{
"lint:format":"eslint --cache --fix **/src/**/*.{html,htm,js,jsx,cjs,mjs,ts,tsx,cts,mts}"
}
}
Vue3、TypeScript项目
{
"extends": ["@eliduty/eslint-config/typescript","@eliduty/eslint-config/vue"]
}
然后执行以下命令:
pnpm pkg set scripts.lint:format="eslint --cache --fix **/src/**/*.{html,htm,js,jsx,cjs,mjs,ts,tsx,cts,mts,vue}"
或者在package.json的scripts中添加如下配置:
{
"scripts":{
"lint:format":"eslint --cache --fix **/src/**/*.{html,htm,js,jsx,cjs,mjs,ts,tsx,cts,mts,vue}"
}
}
1.1.2
2 months ago
1.1.1
4 months ago
1.1.0
4 months ago
1.0.35
5 months ago
1.0.34
5 months ago
1.0.19
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.16
10 months ago
1.0.22
9 months ago
1.0.21
9 months ago
1.0.20
9 months ago
1.0.26
9 months ago
1.0.25
9 months ago
1.0.24
9 months ago
1.0.23
9 months ago
1.0.29
8 months ago
1.0.28
9 months ago
1.0.27
9 months ago
1.0.33
6 months ago
1.0.32
7 months ago
1.0.31
7 months ago
1.0.30
8 months ago
1.0.15
10 months ago
1.0.14
11 months ago
1.0.13
11 months ago
1.0.12
11 months ago
1.0.11
11 months ago
1.0.10
11 months ago
1.0.9
11 months ago
1.0.8
11 months ago
1.0.7
11 months ago
1.0.6
11 months ago
1.0.5
11 months ago
1.0.4
11 months ago
1.0.3
11 months ago
1.0.2
11 months ago
1.0.1
11 months ago