Skip to content

Added 'zhlint' to validate the content format #1076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

docker:
# specify the version you desire here
- image: circleci/node:8
- image: circleci/node:12

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down Expand Up @@ -51,3 +51,39 @@ jobs:
git add .
git commit -m "generated docs"
git push origin HEAD:gh-pages --force
lint:
branches:
ignore:
- master
- gh-pages

docker:
# specify the version you desire here
- image: circleci/node:12

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn lint
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.9.4
v12
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
},
"scripts": {
"start": "hexo server",
"lint": "zhlint 'src/v2/{guide,api,style-guide}/*.md'",
"build": "node pre-deploy.js && hexo clean && hexo generate",
"deploy": "npm run build && hexo deploy"
},
"engines": {
"node": ">=8.9.0"
"node": ">=12.0.0"
},
"dependencies": {
"hexo": "^3.6.0",
Expand All @@ -27,6 +28,7 @@
"hexo-renderer-stylus": "^0.3.3",
"hexo-server": "^0.3.1",
"hoek": "^6.1.2",
"request": "^2.85.0"
"request": "^2.85.0",
"zhlint": "git+https://github.com/Jinjiang/zhlint.git"
}
}
}