Skip to content

Commit 730e0bd

Browse files
committed
chore: add release related tools
1 parent 6a71e25 commit 730e0bd

File tree

9 files changed

+1614
-60
lines changed

9 files changed

+1614
-60
lines changed

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.huskyrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "lint-staged",
4+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
5+
}
6+
}

.lintstagedrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"*.{html,json,md,scss,yml}": [
3+
"prettier --write",
4+
"git add"
5+
],
6+
"*.{mdx,js,ts}": [
7+
"eslint",
8+
"git add"
9+
]
10+
}

.renovaterc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["1stg"]
3+
}

.travis.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
language: node_js
22

3+
node_js:
4+
- --lts
5+
- stable
6+
37
cache: yarn
48

5-
node_js:
6-
- '9'
7-
- '8'
9+
before_install:
10+
- curl -o- -L https://yarnpkg.com/install.sh | bash
11+
- export PATH="$HOME/.yarn/bin:$PATH"
12+
- git config --global user.name 'JounQin'
13+
- git config --global user.email '[email protected]'
814

915
script:
16+
- set -e
1017
- yarn lint
1118
- yarn build
19+
20+
before_deploy:
21+
- set -e
22+
- git remote set-url origin https://user:[email protected]/$TRAVIS_REPO_SLUG.git
23+
- git fetch origin master:master
24+
- git checkout master
25+
- yarn run standard-version -a
26+
- git push --follow-tags origin master
27+
28+
deploy:
29+
provider: npm
30+
31+
api_key: $NPM_TOKEN
32+
skip_cleanup: true
33+
on:
34+
branch: release

.versionrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"skip": {
3+
"bump": true
4+
}
5+
}

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# `eslint-parser-mdx`
22

3-
[![Travis](https://img.shields.io/travis/com/rx-ts/eslint-plugin-mdx.svg?style=flat-square)](https://travis-ci.com/rx-ts/eslint-plugin-mdx)
4-
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5-
[![npm](https://img.shields.io/npm/v/@rxts/eslint-plugin-mdx.svg?style=flat-square)](https://npmjs.org/@rxts/eslint-plugin-mdx)
6-
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
7-
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
3+
[![Travis](https://img.shields.io/travis/com/rx-ts/eslint-plugin-mdx.svg)](https://travis-ci.com/rx-ts/eslint-plugin-mdx)
4+
[![David](https://img.shields.io/david/rx-ts/eslint-plugin-mdx.svg)](https://david-dm.org/rx-ts/eslint-plugin-mdx)
5+
[![David Dev](https://img.shields.io/david/dev/rx-ts/eslint-plugin-mdx.svg)](https://david-dm.org/rx-ts/eslint-plugin-mdx?type=dev)
6+
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
7+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
8+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
89

910
> [ESLint](https://eslint.org/) Parser/Plugin for [MDX](https://github.com/mdx-js/mdx)
1011

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prepublishOnly": "yarn build",
1515
"build": "tsc -P src",
1616
"test": "jest",
17-
"lint": "eslint . --ext ts,mdx"
17+
"lint": "eslint . --ext js,ts,mdx"
1818
},
1919
"peerDependencies": {
2020
"eslint": ">=4.7.0"
@@ -28,20 +28,24 @@
2828
"unified": "^8.3.2"
2929
},
3030
"devDependencies": {
31+
"@commitlint/config-conventional": "^8.1.0",
3132
"@rxts/eslint-plugin-mdx": "file:config",
3233
"@types/eslint": "^4.16.6",
3334
"@types/eslint-visitor-keys": "^1.0.0",
3435
"@types/estree": "^0.0.39",
3536
"@types/node": "^12.6.8",
3637
"@types/unist": "^2.0.3",
38+
"commitlint": "^8.1.0",
3739
"eslint": "^6.1.0",
3840
"eslint-config-1stg": "~5.4.1",
3941
"eslint-plugin-jest": "^22.14.0",
4042
"husky": "^3.0.1",
4143
"jest": "^24.8.0",
44+
"lint-staged": "^9.2.1",
4245
"prettier": "1.18.2",
4346
"prettier-config-1stg": "^0.1.0",
4447
"react": "^16.8.6",
48+
"standard-version": "^6.0.1",
4549
"ts-node": "^8.3.0",
4650
"typescript": "^3.5.3"
4751
}

0 commit comments

Comments
 (0)