Skip to content

Commit

Permalink
chore: add commitlint and editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Feb 2, 2020
1 parent 757d668 commit 79b42a6
Show file tree
Hide file tree
Showing 146 changed files with 243 additions and 356 deletions.
36 changes: 36 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'improvement',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
};
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true
190 changes: 13 additions & 177 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,191 +1,27 @@
# General
.DS_Store
.AppleDouble
.LSOverride



# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# Logs
logs
~*
*.diff
*.patch
*.bak
.DS_Store
*.swp
*.swo
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components
*.log.*

# node-waf configuration
.lock-wscript
/.vscode/

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json


*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

# Used by dotenv library to load environment variables.
# .env

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/
.sass-cache/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
*.gem

yarn.lock
package-lock.json

# jekyll
Gemfile.lock
package-lock.json

_site/
.sass-cache/
.jekyll-metadata
.jekyll-cache/
.jekyll-cache/
6 changes: 3 additions & 3 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**/*.min.css
/node_modules/
/_gh_pages/
**/dist/
**/*.min.css
**/vendor/
/_gh_pages/
/node_modules/
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,4 @@
"value-list-comma-space-after": "always",
"value-no-vendor-prefix": true
}
}
}
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ Breaking changes, please check [Update from 1.x to 2.x](https://tianqi.name/jeky
### Enhancements

- Better article directories
- Dark color theme
- Dark color theme
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ RUN bundle install

EXPOSE 4000

CMD ["bundle", "exec", "jekyll", "help"]
CMD ["bundle", "exec", "jekyll", "help"]
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://rubygems.org"

# gem "github-pages", group: :jekyll_plugins
gemspec
gemspec
2 changes: 1 addition & 1 deletion HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
- run `git add . && git commit -m "release: vx.x.x"` to make a release commit
- run `git tag vx.x.x` to add a tag
- run `git push && git push origin vx.x.x` to push
- edit release on github.com
- edit release on github.com
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ TeXt 使用 [Tomorrow](https://github.com/chriskempson/tomorrow-theme) 作为它

## 协议

TeXt Theme 遵循 [MIT 协议](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE)
TeXt Theme 遵循 [MIT 协议](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ TeXt use [Tomorrow](https://github.com/chriskempson/tomorrow-theme) as the highl

## License

TeXt Theme is [MIT licensed](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE).
TeXt Theme is [MIT licensed](https://github.com/kitian616/jekyll-TeXt-theme/blob/master/LICENSE).
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,4 @@ plugins:
- jekyll-feed
- jekyll-paginate
- jekyll-sitemap
- jemoji
- jemoji
2 changes: 1 addition & 1 deletion _data/licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ CC-BY-NC-4.0:
CC-BY-ND-4.0:
name: Attribution-NoDerivatives 4.0 International
url: https://creativecommons.org/licenses/by-nd/4.0/
image: https://i.creativecommons.org/l/by-nd/4.0/88x31.png
image: https://i.creativecommons.org/l/by-nd/4.0/88x31.png
2 changes: 1 addition & 1 deletion _data/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ sources:
css: 'https://unpkg.com/[email protected]/dist/gitalk.css'
valine: 'https//unpkg.com/valine/dist/Valine.min.js'
mathjax: 'https://unpkg.com/[email protected]/unpacked/MathJax.js?config=TeX-MML-AM_CHTML'
mermaid: 'https://unpkg.com/[email protected]/dist/mermaid.min.js'
mermaid: 'https://unpkg.com/[email protected]/dist/mermaid.min.js'
2 changes: 1 addition & 1 deletion _includes/analytics-providers/custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- start custom analytics snippet -->

<!-- end custom analytics snippet -->
<!-- end custom analytics snippet -->
2 changes: 1 addition & 1 deletion _includes/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
{%- elsif site.analytics.provider == 'custom' -%}
{%- include analytics-providers/custom.html -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/article-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
{%- endif -%}
<div class="article__license">{%- include article/footer/license.html license=_license_data -%}</div>
{%- endif -%}
</footer>
</footer>
2 changes: 1 addition & 1 deletion _includes/article-section-navigator.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
<div class="next"><span>{{ _locale_next }}</span><a href="{{ _href }}">{{ _next.title }}</a></div>
{%- endif -%}
</div>
{%- endif -%}
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/article/footer/author-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
</div>

</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/article/footer/custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- start custom article footer snippet -->

<!-- end custom article footer snippet -->
<!-- end custom article footer snippet -->
2 changes: 1 addition & 1 deletion _includes/article/footer/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
</a>
</p>
</div>
{%- endif -%}
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/article/footer/subscribe.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
{%- assign _paths_rss = __return -%}
{%- include snippets/get-locale-string.html key='SUBSCRIBE' -%}
{%- assign _locale_nav_subscribe = __return -%}
<div class="subscribe"><i class="fas fa-rss"></i> <a type="application/rss+xml" href="{{ _paths_rss }}">{{ _locale_nav_subscribe }}</a></div>
<div class="subscribe"><i class="fas fa-rss"></i> <a type="application/rss+xml" href="{{ _paths_rss }}">{{ _locale_nav_subscribe }}</a></div>
2 changes: 1 addition & 1 deletion _includes/article/top/custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- start custom article top snippet -->

<!-- end custom article top snippet -->
<!-- end custom article top snippet -->
Loading

0 comments on commit 79b42a6

Please sign in to comment.