Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
vue3-app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SVI
svi-templates
vue3-app
Commits
41a1d5ef
Commit
41a1d5ef
authored
Apr 27, 2022
by
曾沂轮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feat: add commit lint optional
parent
c4a8467f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
13 deletions
+43
-13
meta.js
meta.js
+15
-10
commit-msg
template/.husky/commit-msg
+4
-0
pre-commit
template/.husky/pre-commit
+5
-0
package.json
template/package.json
+19
-3
No files found.
meta.js
View file @
41a1d5ef
module
.
exports
=
{
module
.
exports
=
{
renderFiles
:
[
renderFiles
:
[
'package.json'
,
'README.md'
],
'package.json'
,
'README.md'
],
filters
:
{
filters
:
{
commitValid
:
[
'.husky'
]
},
},
prompts
:
{
prompts
:
{
commitValid
:
{
type
:
'confirm'
,
default
:
false
,
message
:
'Add git commit valid to you project'
,
},
name
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
required
:
true
,
required
:
true
,
message
:
'Project name'
message
:
'Project name'
,
},
},
description
:
{
description
:
{
type
:
'string'
,
type
:
'string'
,
...
@@ -19,7 +24,7 @@ module.exports = {
...
@@ -19,7 +24,7 @@ module.exports = {
},
},
author
:
{
author
:
{
type
:
'string'
,
type
:
'string'
,
message
:
'Author'
message
:
'Author'
,
}
},
}
},
}
};
\ No newline at end of file
\ No newline at end of file
template/.husky/commit-msg
0 → 100644
View file @
41a1d5ef
#!/bin/sh
.
"
$(
dirname
"
$0
"
)
/_/husky.sh"
npx
--no-install
commitlint
--edit
$1
template/.husky/pre-commit
0 → 100644
View file @
41a1d5ef
#!/bin/sh
.
"
$(
dirname
"
$0
"
)
/_/husky.sh"
npx
--no-install
lint-staged
npx
--no-install
pretty-quick
--staged
template/package.json
View file @
41a1d5ef
...
@@ -7,12 +7,18 @@
...
@@ -7,12 +7,18 @@
"dev"
:
"vite"
,
"dev"
:
"vite"
,
"build"
:
"vue-tsc --noEmit && vite build"
,
"build"
:
"vue-tsc --noEmit && vite build"
,
"serve"
:
"vite preview"
,
"serve"
:
"vite preview"
,
"lint"
:
"eslint
\"
src/*.ts
\"
\"
src/**
\"
--fix"
"lint"
:
"eslint
\"
src/*.ts
\"
\"
src/**
\"
--fix"
{{
#commitValid
}},
"prepare"
:
"husky install"
{{
/commitValid
}}
},
},
"dependencies"
:
{
"dependencies"
:
{
"vue"
:
"^3.2.13"
"vue"
:
"^3.2.13"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
{{
#commitValid
}}
"@commitlint/cli"
:
"^16.2.3"
,
"@smart/commitlint-config"
:
"^0.1.2"
,
"@smart/conventional-changelog-smart"
:
"^1.0.6"
,
{{
/commitValid
}}
"@smart/eslint-config-typescript"
:
"^2.0.0"
,
"@smart/eslint-config-typescript"
:
"^2.0.0"
,
"@typescript-eslint/eslint-plugin"
:
"^5.21.0"
,
"@typescript-eslint/eslint-plugin"
:
"^5.21.0"
,
"@typescript-eslint/parser"
:
"^5.21.0"
,
"@typescript-eslint/parser"
:
"^5.21.0"
,
...
@@ -22,9 +28,19 @@
...
@@ -22,9 +28,19 @@
"@vue/eslint-config-typescript"
:
"^10.0.0"
,
"@vue/eslint-config-typescript"
:
"^10.0.0"
,
"eslint"
:
"^8.14.0"
,
"eslint"
:
"^8.14.0"
,
"eslint-plugin-vue"
:
"^8.7.1"
,
"eslint-plugin-vue"
:
"^8.7.1"
,
"prettier"
:
"^2.4.1"
,
{{
#commitValid
}}
"husky"
:
"^7.0.4"
,
"lint-staged"
:
"^12.4.1"
,
{{
/commitValid
}}
"prettier"
:
"2.6.2"
,
{{
#commitValid
}}
"pretty-quick"
:
"3.1.3"
,
{{
/commitValid
}}
"typescript"
:
"^4.6.3"
,
"typescript"
:
"^4.6.3"
,
"vite"
:
"^2.9.6"
,
"vite"
:
"^2.9.6"
,
"vue-tsc"
:
"^0.34"
"vue-tsc"
:
"^0.34"
}
}{{
#commitValid
}},
"lint-staged"
:
{
"*.{vue,js,ts,jsx,tsx}"
:
"eslint --fix"
}{{
/commitValid
}}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment