Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: conventional-changelog/commitlint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9ef77c205ce9338850b15374fd003f2052211803
Choose a base ref
...
head repository: conventional-changelog/commitlint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3982e5a6bf0c28e4b1109e8516d7fdcfad411eac
Choose a head ref
Loading
Showing 392 changed files with 15,880 additions and 12,946 deletions.
47 changes: 36 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2.1

orbs:
win: circleci/windows@2.4.0

commands:
update-yarn:
steps:
@@ -10,7 +13,7 @@ commands:
steps:
- run:
name: Install dependencies
command: yarn install --ignore-engines
command: yarn install --ignore-engines --frozen-lockfile
audit:
steps:
- run:
@@ -26,6 +29,11 @@ commands:
- run:
name: Lint project
command: yarn lint
format:
steps:
- run:
name: Format project
command: yarn format
deps:
steps:
- run:
@@ -35,14 +43,14 @@ commands:
steps:
- run:
name: Test
command: yarn test
command: yarn test-ci
save-cache:
steps:
- save_cache:
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
run-node:
run-all:
steps:
- checkout
- restore_cache:
@@ -53,28 +61,45 @@ commands:
- save-cache
- build
- lint
- format
- deps
- test
jobs:
v8:
docker:
- image: node:8
run-tests:
steps:
- run-node
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
- update-yarn
- install
- save-cache
- build
- test
jobs:
v10:
docker:
- image: node:10
steps:
- run-node
- run-tests
v12:
docker:
- image: node:12
steps:
- run-node
- run-all
v14:
docker:
- image: node:14
steps:
- run-tests
windows-v12:
executor: win/default
steps:
- run-tests

workflows:
node:
jobs:
- v8
- v10
- v12
- v14
- windows-v12
22 changes: 11 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "commitlint-dev",
"dockerComposeFile": ["../docker-compose.yml"],
"service": "commitlint",
"workspaceFolder": "/root/repo",
"shutdownAction": "stopCompose",
"extensions": [
"editorconfig.editorconfig",
"ms-vsliveshare.vsliveshare-pack",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode"
]
"name": "commitlint-dev",
"dockerComposeFile": ["../docker-compose.yml"],
"service": "commitlint",
"workspaceFolder": "/root/repo",
"shutdownAction": "stopCompose",
"extensions": [
"editorconfig.editorconfig",
"ms-vsliveshare.vsliveshare-pack",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode"
]
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{.*rc,*.yml,*.md,package.json,lerna.json,*.svg}]
[{.*rc,*.yml,*.md,*.json,*.svg}]
indent_style = space

[*.md]
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lib/
coverage/
node_modules/
fixtures/
74 changes: 74 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
module.exports = {
root: true,
plugins: ['@typescript-eslint', 'jest', 'import'],
env: {
es6: true,
node: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 11,
ecmaFeatures: {
jsx: false,
},
},
extends: ['eslint:recommended', 'prettier'],
rules: {
// disallow non-import statements appearing before import statements
'import/first': 'error',
// Forbid import of modules using absolute paths
'import/no-absolute-path': 'error',
// disallow AMD require/define
'import/no-amd': 'error',
// Forbid mutable exports
'import/no-mutable-exports': 'error',
// Prevent importing the default as if it were named
'import/no-named-default': 'error',
// Forbid a module from importing itself
'import/no-self-import': 'error',

// Enable after https://github.com/benmosher/eslint-plugin-import/issues/1650 is fixed
// Forbid the use of extraneous packages
// 'import/no-extraneous-dependencies': [
// 'error',
// {devDependencies: ['**/*.test.js']}
// ]
},
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',

// TODO: enable those rules?
'no-empty': 'off',
'no-var': 'off',
},
},
{
files: ['*.test.ts', '*.test.js'],
env: {
jest: true,
},
extends: ['plugin:jest/recommended'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
// disallow non-import statements appearing before import statements
'import/first': 'off',
},
},
],
};
20 changes: 10 additions & 10 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

53 changes: 29 additions & 24 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -6,52 +6,57 @@ Yeay! You want to contribute to commitlint. That's amazing!
To smoothen everyone's experience involved with the project please take note of the following guidelines and rules.

## Found an Issue?

Thank you for reporting any issues you find. We do our best to test and make commitlint as solid as possible, but any reported issue is a real help.

> commitlint issues
Please follow these guidelines when reporting issues:
* Provide a title in the format of `<Error> when <Task>`
* Tag your issue with the tag `bug`
* Provide a short summary of what you are trying to do
* Provide the log of the encountered error if applicable
* Provide the exact version of commitlint. Check `npm ls @commitlint/cli` when in doubt
* Be awesome and consider contributing a [pull request](#want-to-contribute)

- Provide a title in the format of `<Error> when <Task>`
- Tag your issue with the tag `bug`
- Provide a short summary of what you are trying to do
- Provide the log of the encountered error if applicable
- Provide the exact version of commitlint. Check `npm ls @commitlint/cli` when in doubt
- Be awesome and consider contributing a [pull request](#want-to-contribute)

## Want to contribute?

You consider contributing changes to commitlint – we dig that!
Please consider these guidelines when filing a pull request:

> commitlint pull requests
* Follow the [Coding Rules](#coding-rules)
* Follow the [Commit Rules](#commit-rules)
* Make sure you rebased the current master branch when filing the pull request
* Squash your commits when filing the pull request
* Provide a short title with a maximum of 100 characters
* Provide a more detailed description containing
* What you want to achieve
* What you changed
* What you added
* What you removed
- Follow the [Coding Rules](#coding-rules)
- Follow the [Commit Rules](#commit-rules)
- Make sure you rebased the current master branch when filing the pull request
- Squash your commits when filing the pull request
- Provide a short title with a maximum of 100 characters
- Provide a more detailed description containing
_ What you want to achieve
_ What you changed
_ What you added
_ What you removed

## Coding Rules

To keep the code base of commitlint neat and tidy the following rules apply to every change

> Coding standards
* `prettier` is king
* Favor micro library over swiss army knives (rimraf, ncp vs. fs-extra)
* Be awesome
- `prettier` is king
- Favor micro library over swiss army knives (rimraf, ncp vs. fs-extra)
- Be awesome

## Commit Rules

To help everyone with understanding the commit history of commitlint the following commit rules are enforced.
To make your life easier commitlint is commitizen-friendly and provides the npm run-script `commit`.

> Commit standards
* [conventional-changelog](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/prompt)
* husky commit message hook available
* present tense
* maximum of 100 characters
* message format of `$type($scope): $message`
- [conventional-changelog](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/prompt)
- husky commit message hook available
- present tense
- maximum of 100 characters
- message format of `$type($scope): $message`
30 changes: 18 additions & 12 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior

<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->

## Current Behavior

<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->

## Affected packages
* [ ] cli
* [ ] core
* [ ] prompt
* [ ] config-angular

- [ ] cli
- [ ] core
- [ ] prompt
- [ ] config-angular

## Possible Solution

<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

## Steps to Reproduce (for bugs)

<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

1. First step
2. Second step

<details>
<summary>commitlint.config.js</summary>
@@ -35,14 +39,16 @@
</details>

## Context

<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Your Environment

<!--- Include as many relevant details about the environment you experienced the bug in -->

| Executable | Version |
| ---: | :--- |
| Executable | Version |
| ---------------------: | :------ |
| `commitlint --version` | VERSION |
| `git --version` | VERSION |
| `node --version` | VERSION |
| `git --version` | VERSION |
| `node --version` | VERSION |
Loading