Skip to content

Commit

Permalink
✨ feat: cz新增代码检查功能
Browse files Browse the repository at this point in the history
  • Loading branch information
liliphoenix committed Apr 20, 2024
1 parent 5e9742b commit fb2bf1f
Show file tree
Hide file tree
Showing 60 changed files with 3,349 additions and 1,208 deletions.
19 changes: 19 additions & 0 deletions packages/cli/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-console": "off"
},
// set eslint env
"env": {
"node": true
}
}
5 changes: 5 additions & 0 deletions packages/cli/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.history/
node_modules
lib
dist
template
16 changes: 16 additions & 0 deletions packages/cli/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
// 一行的字符数,如果超过会进行换行,默认为80
printWidth: 80,
// 一个tab代表几个空格数,默认为2
tabWidth: 2,
// 是否使用tab进行缩进,默认为false,表示用空格进行缩减
useTabs: false,
// 字符串是否使用单引号,默认为false,使用双引号
singleQuote: true,
// 行位是否使用分号,默认为true
semi: false,
// 是否使用尾逗号,有三个可选值"<none|es5|all>"
trailingComma: 'none',
// 对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
bracketSpacing: true
}
4 changes: 2 additions & 2 deletions packages/cli/bin/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node
import main from "../lib/index.js";
main();
import main from '../lib/index.js'
main()
Loading

0 comments on commit fb2bf1f

Please sign in to comment.