Skip to content

Commit 79b42a6

Browse files
committed
chore: add commitlint and editorconfig
1 parent 757d668 commit 79b42a6

File tree

146 files changed

+243
-356
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+243
-356
lines changed

.commitlintrc.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
parserPreset: 'conventional-changelog-conventionalcommits',
3+
rules: {
4+
'body-leading-blank': [1, 'always'],
5+
'footer-leading-blank': [1, 'always'],
6+
'header-max-length': [2, 'always', 72],
7+
'scope-case': [2, 'always', 'lower-case'],
8+
'subject-case': [
9+
2,
10+
'never',
11+
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
12+
],
13+
'subject-empty': [2, 'never'],
14+
'subject-full-stop': [2, 'never', '.'],
15+
'type-case': [2, 'always', 'lower-case'],
16+
'type-empty': [2, 'never'],
17+
'type-enum': [
18+
2,
19+
'always',
20+
[
21+
'build',
22+
'chore',
23+
'ci',
24+
'docs',
25+
'feat',
26+
'fix',
27+
'improvement',
28+
'perf',
29+
'refactor',
30+
'revert',
31+
'style',
32+
'test'
33+
]
34+
]
35+
}
36+
};

.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
max_line_length = 80
11+
trim_trailing_whitespace = true

.gitignore

+13-177
Original file line numberDiff line numberDiff line change
@@ -1,191 +1,27 @@
1-
# General
2-
.DS_Store
3-
.AppleDouble
4-
.LSOverride
5-
6-
7-
8-
# Thumbnails
9-
._*
10-
11-
# Files that might appear in the root of a volume
12-
.DocumentRevisions-V100
13-
.fseventsd
14-
.Spotlight-V100
15-
.TemporaryItems
16-
.Trashes
17-
.VolumeIcon.icns
18-
.com.apple.timemachine.donotpresent
19-
20-
# Directories potentially created on remote AFP share
21-
.AppleDB
22-
.AppleDesktop
23-
Network Trash Folder
24-
Temporary Items
25-
.apdisk
26-
27-
# Windows thumbnail cache files
28-
Thumbs.db
29-
ehthumbs.db
30-
ehthumbs_vista.db
31-
32-
# Dump file
33-
*.stackdump
34-
35-
# Folder config file
36-
Desktop.ini
37-
38-
# Recycle Bin used on file shares
39-
$RECYCLE.BIN/
40-
41-
# Windows Installer files
42-
*.cab
43-
*.msi
44-
*.msm
45-
*.msp
46-
47-
# Windows shortcuts
48-
*.lnk
49-
501
*~
51-
52-
# temporary files which can be created if a process still has a handle open of a deleted file
53-
.fuse_hidden*
54-
55-
# KDE directory preferences
56-
.directory
57-
58-
# Linux trash folder which might appear on any partition or disk
59-
.Trash-*
60-
61-
# .nfs files are created when an open file is removed but is still being accessed
62-
.nfs*
63-
64-
# Logs
65-
logs
2+
~*
3+
*.diff
4+
*.patch
5+
*.bak
6+
.DS_Store
7+
*.swp
8+
*.swo
669
*.log
67-
npm-debug.log*
68-
yarn-debug.log*
69-
yarn-error.log*
70-
71-
# Runtime data
72-
pids
73-
*.pid
74-
*.seed
75-
*.pid.lock
76-
77-
# Directory for instrumented libs generated by jscoverage/JSCover
78-
lib-cov
79-
80-
# Coverage directory used by tools like istanbul
81-
coverage
82-
83-
# nyc test coverage
84-
.nyc_output
85-
86-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
87-
.grunt
88-
89-
# Bower dependency directory (https://bower.io/)
90-
bower_components
10+
*.log.*
9111

92-
# node-waf configuration
93-
.lock-wscript
12+
/.vscode/
9413

95-
# Compiled binary addons (https://nodejs.org/api/addons.html)
96-
build/Release
97-
98-
# Dependency directories
9914
node_modules/
100-
jspm_packages/
101-
102-
# Typescript v1 declaration files
103-
typings/
104-
105-
# Optional npm cache directory
106-
.npm
107-
108-
# Optional eslint cache
109-
.eslintcache
110-
111-
# Optional REPL history
112-
.node_repl_history
113-
114-
# Output of 'npm pack'
115-
*.tgz
116-
117-
# Yarn Integrity file
118-
.yarn-integrity
119-
120-
# dotenv environment variables file
121-
.env
122-
123-
124-
.vscode/*
125-
!.vscode/settings.json
126-
!.vscode/tasks.json
127-
!.vscode/launch.json
128-
!.vscode/extensions.json
129-
130-
131-
*.gem
132-
*.rbc
133-
/.config
134-
/coverage/
135-
/InstalledFiles
136-
/pkg/
137-
/spec/reports/
138-
/spec/examples.txt
139-
/test/tmp/
140-
/test/version_tmp/
141-
/tmp/
142-
143-
# Used by dotenv library to load environment variables.
144-
# .env
145-
146-
## Specific to RubyMotion:
147-
.dat*
148-
.repl_history
149-
build/
150-
*.bridgesupport
151-
build-iPhoneOS/
152-
build-iPhoneSimulator/
153-
154-
## Specific to RubyMotion (use of CocoaPods):
155-
#
156-
# We recommend against adding the Pods directory to your .gitignore. However
157-
# you should judge for yourself, the pros and cons are mentioned at:
158-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
159-
#
160-
# vendor/Pods/
161-
162-
## Documentation cache and generated files:
163-
/.yardoc/
164-
/_yardoc/
165-
/doc/
166-
/rdoc/
15+
.sass-cache/
16716

168-
## Environment normalization:
16917
/.bundle/
17018
/vendor/bundle
171-
/lib/bundler/man/
172-
173-
# for a library or gem, you might want to ignore these files since the code is
174-
# intended to run in multiple environments; otherwise, check them in:
175-
# Gemfile.lock
176-
# .ruby-version
177-
# .ruby-gemset
178-
179-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
180-
.rvmrc
19+
*.gem
18120

18221
yarn.lock
18322
package-lock.json
184-
185-
# jekyll
18623
Gemfile.lock
187-
package-lock.json
24+
18825
_site/
189-
.sass-cache/
19026
.jekyll-metadata
191-
.jekyll-cache/
27+
.jekyll-cache/

.stylelintignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
**/*.min.css
1+
/node_modules/
2+
/_gh_pages/
23
**/dist/
4+
**/*.min.css
35
**/vendor/
4-
/_gh_pages/
5-
/node_modules/

.stylelintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,4 @@
273273
"value-list-comma-space-after": "always",
274274
"value-no-vendor-prefix": true
275275
}
276-
}
276+
}

.vscode/settings.json

-4
This file was deleted.

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,4 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky
219219
### Enhancements
220220

221221
- Better article directories
222-
- Dark color theme
222+
- Dark color theme

Dockerfile.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ RUN bundle install
1515

1616
EXPOSE 4000
1717

18-
CMD ["bundle", "exec", "jekyll", "help"]
18+
CMD ["bundle", "exec", "jekyll", "help"]

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source "https://rubygems.org"
22

33
# gem "github-pages", group: :jekyll_plugins
4-
gemspec
4+
gemspec

HOW_TO_RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
- run `git add . && git commit -m "release: vx.x.x"` to make a release commit
1717
- run `git tag vx.x.x` to add a tag
1818
- run `git push && git push origin vx.x.x` to push
19-
- edit release on github.com
19+
- edit release on github.com

README-zh.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ TeXt 使用 [Tomorrow](https://github.com/chriskempson/tomorrow-theme) 作为它
103103

104104
## 协议
105105

106-
TeXt Theme 遵循 [MIT 协议](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE)
106+
TeXt Theme 遵循 [MIT 协议](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ TeXt use [Tomorrow](https://github.com/chriskempson/tomorrow-theme) as the highl
8686

8787
## License
8888

89-
TeXt Theme is [MIT licensed](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE).
89+
TeXt Theme is [MIT licensed](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE).

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,4 @@ plugins:
222222
- jekyll-feed
223223
- jekyll-paginate
224224
- jekyll-sitemap
225-
- jemoji
225+
- jemoji

_data/licenses.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ CC-BY-NC-4.0:
1313
CC-BY-ND-4.0:
1414
name: Attribution-NoDerivatives 4.0 International
1515
url: https://creativecommons.org/licenses/by-nd/4.0/
16-
image: https://i.creativecommons.org/l/by-nd/4.0/88x31.png
16+
image: https://i.creativecommons.org/l/by-nd/4.0/88x31.png

_data/variables.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ sources:
6161
css: 'https://unpkg.com/gitalk@1.2.2/dist/gitalk.css'
6262
valine: 'https//unpkg.com/valine/dist/Valine.min.js'
6363
mathjax: 'https://unpkg.com/mathjax@2.7.4/unpacked/MathJax.js?config=TeX-MML-AM_CHTML'
64-
mermaid: 'https://unpkg.com/mermaid@8.0.0-rc.8/dist/mermaid.min.js'
64+
mermaid: 'https://unpkg.com/mermaid@8.0.0-rc.8/dist/mermaid.min.js'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<!-- start custom analytics snippet -->
22

3-
<!-- end custom analytics snippet -->
3+
<!-- end custom analytics snippet -->

_includes/analytics.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
{%- elsif site.analytics.provider == 'custom' -%}
55
{%- include analytics-providers/custom.html -%}
66
{%- endif -%}
7-
{%- endif -%}
7+
{%- endif -%}

_includes/article-footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@
5252
{%- endif -%}
5353
<div class="article__license">{%- include article/footer/license.html license=_license_data -%}</div>
5454
{%- endif -%}
55-
</footer>
55+
</footer>

_includes/article-section-navigator.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@
5151
<div class="next"><span>{{ _locale_next }}</span><a href="{{ _href }}">{{ _next.title }}</a></div>
5252
{%- endif -%}
5353
</div>
54-
{%- endif -%}
54+
{%- endif -%}

_includes/article/footer/author-profile.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444
</div>
4545

4646
</div>
47-
</div>
47+
</div>

_includes/article/footer/custom.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<!-- start custom article footer snippet -->
22

3-
<!-- end custom article footer snippet -->
3+
<!-- end custom article footer snippet -->

_includes/article/footer/license.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
</a>
1212
</p>
1313
</div>
14-
{%- endif -%}
14+
{%- endif -%}

_includes/article/footer/subscribe.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
{%- assign _paths_rss = __return -%}
44
{%- include snippets/get-locale-string.html key='SUBSCRIBE' -%}
55
{%- assign _locale_nav_subscribe = __return -%}
6-
<div class="subscribe"><i class="fas fa-rss"></i> <a type="application/rss+xml" href="{{ _paths_rss }}">{{ _locale_nav_subscribe }}</a></div>
6+
<div class="subscribe"><i class="fas fa-rss"></i> <a type="application/rss+xml" href="{{ _paths_rss }}">{{ _locale_nav_subscribe }}</a></div>

_includes/article/top/custom.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<!-- start custom article top snippet -->
22

3-
<!-- end custom article top snippet -->
3+
<!-- end custom article top snippet -->

0 commit comments

Comments
 (0)