Skip to content

Commit d4a3d5c

Browse files
author
wanglinquan
committed
build: add commitlint/eslint configurations
1 parent d1089f6 commit d4a3d5c

File tree

7 files changed

+252
-0
lines changed

7 files changed

+252
-0
lines changed

.cz-config.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
module.exports = {
2+
types: [
3+
{
4+
value: 'build',
5+
name: '📦 build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)'
6+
},
7+
{
8+
value: 'ci',
9+
name: '🕓 ci: Changes to our CI configuration files and scripts (example scopes: Circle, Docker, BrowserStack)'
10+
},
11+
{
12+
value: 'docs',
13+
name: '📚 docs: Documentation only changes'
14+
},
15+
{
16+
value: 'feat',
17+
name: '🚀 feat: A new feature'
18+
},
19+
{
20+
value: 'fix',
21+
name: '🔧 fix: A bug fix'
22+
},
23+
{
24+
value: 'perf',
25+
name: '📈 perf: A code change that improves performance'
26+
},
27+
{
28+
value: 'refactor',
29+
name: '🔨 refactor: A code change that neither fixes a bug nor adds a feature'
30+
},
31+
{
32+
value: 'release',
33+
name: '🚢 release: Release a new version of current project'
34+
},
35+
{
36+
value: 'revert',
37+
name: '⏱ revert: Revert to a commit'
38+
},
39+
{
40+
value: 'style',
41+
name: '💅 style: Code Style, Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)'
42+
},
43+
{
44+
value: 'test',
45+
name: '🔍 test: Add missing tests or correcting existing tests'
46+
},
47+
{
48+
value: 'workflow',
49+
name: '📦 [NOT RECOMMENDED] workflow: Changes that only affect the workflow. Such as updateing build systems or CI etc.'
50+
}
51+
],
52+
// Specify the scopes for your particular project
53+
scopes: [],
54+
allowCustomScopes: true,
55+
allowBreakingChanges: ['feat', 'fix']
56+
}

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'babel-eslint',
4+
parserOptions: {},
5+
globals: {},
6+
env: {
7+
'browser': true
8+
},
9+
extends: 'standard',
10+
plugins: [],
11+
settings: {},
12+
rules: {}
13+
}

.gitignore

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2+
3+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,node
4+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,node
5+
6+
### macOS ###
7+
# General
8+
.DS_Store
9+
.AppleDouble
10+
.LSOverride
11+
12+
# Icon must end with two \r
13+
Icon
14+
15+
# Thumbnails
16+
._*
17+
18+
# Files that might appear in the root of a volume
19+
.DocumentRevisions-V100
20+
.fseventsd
21+
.Spotlight-V100
22+
.TemporaryItems
23+
.Trashes
24+
.VolumeIcon.icns
25+
.com.apple.timemachine.donotpresent
26+
27+
# Directories potentially created on remote AFP share
28+
.AppleDB
29+
.AppleDesktop
30+
Network Trash Folder
31+
Temporary Items
32+
.apdisk
33+
34+
### Node ###
35+
# Logs
36+
logs
37+
*.log
38+
npm-debug.log*
39+
yarn-debug.log*
40+
yarn-error.log*
41+
lerna-debug.log*
42+
43+
# Diagnostic reports (https://nodejs.org/api/report.html)
44+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
45+
46+
# Runtime data
47+
pids
48+
*.pid
49+
*.seed
50+
*.pid.lock
51+
52+
# Directory for instrumented libs generated by jscoverage/JSCover
53+
lib-cov
54+
55+
# Coverage directory used by tools like istanbul
56+
coverage
57+
*.lcov
58+
59+
# nyc test coverage
60+
.nyc_output
61+
62+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
63+
.grunt
64+
65+
# Bower dependency directory (https://bower.io/)
66+
bower_components
67+
68+
# node-waf configuration
69+
.lock-wscript
70+
71+
# Compiled binary addons (https://nodejs.org/api/addons.html)
72+
build/Release
73+
74+
# Dependency directories
75+
node_modules/
76+
jspm_packages/
77+
78+
# TypeScript v1 declaration files
79+
typings/
80+
81+
# TypeScript cache
82+
*.tsbuildinfo
83+
84+
# Optional npm cache directory
85+
.npm
86+
87+
# Optional eslint cache
88+
.eslintcache
89+
90+
# Microbundle cache
91+
.rpt2_cache/
92+
.rts2_cache_cjs/
93+
.rts2_cache_es/
94+
.rts2_cache_umd/
95+
96+
# Optional REPL history
97+
.node_repl_history
98+
99+
# Output of 'npm pack'
100+
*.tgz
101+
102+
# Yarn Integrity file
103+
.yarn-integrity
104+
105+
# dotenv environment variables file
106+
.env
107+
.env.test
108+
.env*.local
109+
110+
# parcel-bundler cache (https://parceljs.org/)
111+
.cache
112+
.parcel-cache
113+
114+
# Next.js build output
115+
.next
116+
117+
# Nuxt.js build / generate output
118+
.nuxt
119+
dist
120+
121+
# Gatsby files
122+
.cache/
123+
# Comment in the public line in if your project uses Gatsby and not Next.js
124+
# https://nextjs.org/blog/next-9-1#public-directory-support
125+
# public
126+
127+
# vuepress build output
128+
.vuepress/dist
129+
130+
# Serverless directories
131+
.serverless/
132+
133+
# FuseBox cache
134+
.fusebox/
135+
136+
# DynamoDB Local files
137+
.dynamodb/
138+
139+
# TernJS port file
140+
.tern-port
141+
142+
# Stores VSCode versions used for testing VSCode extensions
143+
.vscode-test
144+
145+
### VisualStudioCode ###
146+
.vscode/*
147+
!.vscode/settings.json
148+
!.vscode/tasks.json
149+
!.vscode/launch.json
150+
!.vscode/extensions.json
151+
*.code-workspace
152+
153+
### VisualStudioCode Patch ###
154+
# Ignore all local history of files
155+
.history
156+
.ionide
157+
158+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,node
159+
160+
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
161+

commitlint.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
extends: [
3+
'cz'
4+
],
5+
rules: {
6+
'type-empty': [2, 'never']
7+
}
8+
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"bugs": {
1212
"url": "https://github.com/qqcome110/vue-cli-plugin-multiple-page/issues"
1313
},
14+
"scripts": {
15+
"cz": "npx git-cz"
16+
},
1417
"peerDependencies": {
1518
"@vue/cli-service": "^3.0.0 || ^4.0.0-0"
1619
},

0 commit comments

Comments
 (0)