Skip to content
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
17 changes: 0 additions & 17 deletions .codeclimate.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Customizable commit-analyzer plugin for [semantic-release](https://github.com/se
[![npm](https://img.shields.io/npm/dt/sr-commit-analyzer.svg)](https://www.npmjs.com/package/sr-commit-analyzer)
[![Greenkeeper badge](https://badges.greenkeeper.io/vanduynslagerp/sr-commit-analyzer.svg)](https://greenkeeper.io/)
[![license](https://img.shields.io/github/license/vanduynslagerp/sr-commit-analyzer.svg)](https://github.com/vanduynslagerp/sr-commit-analyzer/blob/master/LICENSE)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

[![Travis](https://img.shields.io/travis/vanduynslagerp/sr-commit-analyzer.svg)](https://travis-ci.org/vanduynslagerp/sr-commit-analyzer)
[![Code Climate](https://img.shields.io/codeclimate/github/vanduynslagerp/sr-commit-analyzer.svg)](https://codeclimate.com/github/vanduynslagerp/sr-commit-analyzer)
[![Codecov](https://img.shields.io/codecov/c/github/vanduynslagerp/sr-commit-analyzer.svg)](https://codecov.io/gh/vanduynslagerp/sr-commit-analyzer)

## Install
Expand Down
2 changes: 1 addition & 1 deletion lib/analyze-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const compareReleaseTypes = require('./compare-release-types');

/**
* Find all the rules matching and return the highest release type of the matching rules.
*
*
* @param {Array} releaseRules the rules to match the commit against.
* @param {Commit} commit a parsed commit.
* @return {string} the highest release type of the matching rules or `undefined` if no rule match the commit.
Expand Down
2 changes: 1 addition & 1 deletion lib/default/release-rules.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Default `releaseRules` rules for common commit formats, following conventions.
*
*
* @type {Array}
*/
module.exports = [
Expand Down
2 changes: 1 addition & 1 deletion lib/default/release-types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Type of release supported by Semver/NPM.
*
*
* @type {Array}
*/
module.exports = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const DEFAULT_RELEASE_RULES = require('./default/release-rules');

/**
* Determine the type of release to create based on a list of commits.
*
*
* @param {Object} pluginConfig semantic-release configuration
* @param {string} pluginConfig.preset conventional-changelog preset ('angular', 'atom', 'codemirror', 'ember', 'eslint', 'express', 'jquery', 'jscs', 'jshint')
* @param {string} pluginConfig.config requierable npm package with a custom conventional-changelog preset
Expand Down
2 changes: 1 addition & 1 deletion lib/load/parser-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const conventionalChangelogAngular = require('conventional-changelog-angular');

/**
* Load `conventional-changelog-parser` options. Handle presets that return either a `Promise<Array>` or a `Promise<Function>`.
*
*
* @param {Object} preset conventional-changelog preset ('angular', 'atom', 'codemirror', 'ember', 'eslint', 'express', 'jquery', 'jscs', 'jshint')
* @param {string} config requierable npm package with a custom conventional-changelog preset
* @param {Object} parserOpts additionnal `conventional-changelog-parser` options that will overwrite ones loaded by `preset` or `config`.
Expand Down
4 changes: 2 additions & 2 deletions lib/load/release-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const RELEASE_TYPES = require('../default/release-types');

/**
* Load and validate the `releaseRules` rules.
*
*
* If `releaseRules` parameter is a `string` then load it as an external module with `require`.
* Verifies that the loaded/parameter `releaseRules` is an `Array` and each element has a valid `release` attribute.
*
*
* @param {string|Array} releaseRules a string to load an external module or an `Array` of rules.
* @return {Array} the loaded and validated `releaseRules`.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const parser = require('conventional-commits-parser').sync;

/**
* Parse a raw commit.
*
*
* @method parse
* @param {[type]} rawCommit the raw commit message.
* @param {[type]} config the parser configuration.
Expand Down
43 changes: 31 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"config": {
"commitizen": {
"path": "@metahub/cz-conventional-commit"
"path": "cz-conventional-changelog"
}
},
"dependencies": {
Expand All @@ -22,7 +22,6 @@
"devDependencies": {
"@commitlint/cli": "^3.1.3",
"@commitlint/config-angular": "^3.1.1",
"@metahub/cz-conventional-commit": "^2.0.0",
"ava": "^0.22.0",
"codecov": "^2.3.0",
"commitizen": "^2.9.6",
Expand All @@ -31,20 +30,15 @@
"conventional-changelog-eslint": "^0.2.0",
"conventional-changelog-express": "^0.2.0",
"conventional-changelog-jshint": "^0.2.0",
"cz-conventional-changelog": "^2.0.0",
"eslint": "^4.5.0",
"eslint-config-prettier": "^2.3.0",
"eslint-config-pretty": "^2.1.1",
"eslint-plugin-ava": "^4.2.1",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-eslint-comments": "^1.0.3",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jasmine": "^2.8.4",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-sort-class-members": "^1.2.0",
"eslint-plugin-unicorn": "^2.1.2",
"eslint-plugin-standard": "^3.0.1",
"husky": "^0.14.3",
"nyc": "^11.1.0",
"prettier": "^1.5.3",
Expand All @@ -56,6 +50,26 @@
"engines": {
"node": ">=8"
},
"eslintConfig": {
"extends": [
"standard",
"prettier"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
2,
{
"printWidth": 120,
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "es5"
}
]
}
},
"files": [
"lib"
],
Expand Down Expand Up @@ -89,6 +103,12 @@
"peerDependencies": {
"semantic-release": ">= 4"
},
"prettier": {
"printWidth": 120,
"singleQuote": true,
"bracketSpacing": false,
"trailingComma": "es5"
},
"publishConfig": {
"access": "public"
},
Expand All @@ -110,8 +130,7 @@
"codecov": "codecov",
"commitmsg": "commitlint -e",
"coverage": "nyc check-coverage",
"lint": "eslint lib test package.json",
"postcheckout": "yarn install || (rimraf && npm install)",
"lint": "eslint lib test",
"precommit": "npm run lint",
"prepush": "ava -v",
"pretest": "npm run clean && npm run lint",
Expand Down
4 changes: 2 additions & 2 deletions test/load-parser-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import loadParserConfig from './../lib/load/parser-config';

/**
* AVA macro to verify that `loadParserConfig` return a parserOpts object.
*
*
* @method loadPreset
* @param {Object} t AVA assertion library.
* @param {[type]} preset the `conventional-changelog` preset to test.
Expand All @@ -16,7 +16,7 @@ loadPreset.title = (providedTitle, preset) => `${providedTitle} Load "${preset}"

/**
* AVA macro to verify that `loadParserConfig` return a parserOpts object.
*
*
* @method loadPreset
* @param {Object} t AVA assertion library.
* @param {[type]} config the `conventional-changelog` config to test.
Expand Down