chore: add commitlint, husky and release-it

This commit is contained in:
divlo 2020-12-27 18:18:34 +01:00
parent f66fcdc79b
commit 5cb97809bb
2 changed files with 43 additions and 12 deletions

1
commitlint.config.js Normal file
View File

@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] }

View File

@ -1,7 +1,8 @@
{ {
"name": "socketio-jwt", "name": "@thream/socketio-jwt",
"version": "4.6.2", "version": "0.0.1",
"description": "authenticate socket.io connections using JWTs", "description": "Authenticate socket.io incoming connections with JWTs.",
"license": "MIT",
"main": "lib/index.js", "main": "lib/index.js",
"types": "./types/index.d.ts", "types": "./types/index.d.ts",
"keywords": [ "keywords": [
@ -9,30 +10,59 @@
"socket.io", "socket.io",
"jwt" "jwt"
], ],
"author": {
"name": "José F. Romaniello",
"email": "jfromaniello@gmail.com",
"url": "http://joseoncode.com"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/auth0/socketio-jwt.git" "url": "git+https://github.com/Thream/socketio-jwt"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "npm run lint"
}
},
"release-it": {
"git": {
"commitMessage": "chore(release): v${version}"
},
"github": {
"release": false
},
"npm": {
"publish": false
},
"hooks": {
"before:init": [
"npm run lint",
"npm run test"
]
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md"
}
}
}, },
"scripts": { "scripts": {
"test": "mocha" "test": "mocha",
"lint": "exit 0"
}, },
"license": "MIT",
"dependencies": { "dependencies": {
"jsonwebtoken": "8.3.0", "jsonwebtoken": "8.3.0",
"xtend": "2.1.2" "xtend": "2.1.2"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@release-it/conventional-changelog": "2.0.0",
"@types/socket.io": "2.1.12", "@types/socket.io": "2.1.12",
"express": "4.17.1", "express": "4.17.1",
"husky": "4.3.6",
"mocha": "3.2.0", "mocha": "3.2.0",
"q": "1.5.1",
"release-it": "14.2.2",
"request": "2.81.0", "request": "2.81.0",
"serve-static": "1.13.2", "serve-static": "1.13.2",
"q": "1.5.1",
"server-destroy": "1.0.1", "server-destroy": "1.0.1",
"should": "11.2.1", "should": "11.2.1",
"socket.io": "2.3.0", "socket.io": "2.3.0",