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
3 changes: 2 additions & 1 deletion .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
{ value: "feat", name: "feat: A new feature" },
{ value: "fix", name: "fix: Bugs, typos, etc" },
{ value: "misc", name: "misc: Other formats like tweaks and such" },
{ value: "tests", name: "tests: Tests, jest, binTestCases, etc" }
{ value: "tests", name: "tests: Tests, jest, binTestCases, etc" },
{ value: "break", name: "break: changes that break the behaviour of the cli" }
]
};
15 changes: 7 additions & 8 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@
"use strict";

module.exports = {
extends: ["cz", "@commitlint/config-lerna-scopes", "@commitlint/config-angular"],
extends: ["cz", "@commitlint/config-lerna-scopes"],
rules: {
"body-leading-blank": [1, "always"],
"body-tense": [1, "always", ["present-imperative"]],
"footer-leading-blank": [1, "always"],
"footer-tense": [1, "always", ["present-imperative"]],
"header-max-length": [2, "always", 80],
lang: [0, "always", "eng"],
"scope-case": [2, "always", "lowerCase"],
"scope-empty": [0, "never"],
"subject-case": [1, "always", "lowerCase"],
"subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
"subject-empty": [0, "never"],
"subject-full-stop": [2, "never", "."],
"subject-tense": [1, "always", ["present-imperative"]],
"type-case": [2, "always", "lowerCase"],
"type-empty": [2, "never"]
// The scope-enum : defined in the cz-config
// The 'type-enum': defined in the cz-config
// turn it on once CLI will be inside its own package, so the scope will be the name of the pacakged

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean with cli in it's own package?

@ematipico ematipico Sep 16, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plungin commitlint for lerna forces to have a commit message where inside the parentheses you have to write down the name of the package. Please read what that package does.

It wasn't working before because the commitlint was half broken.
For now I turned off the rule meanwhile we decide what to do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay thanks for info! 💙

// part of the @commitlint/config-lerna-scopes
"scope-enum": [0, "never"],
"type-empty": [2, "never"],
"type-enum": [2, "always", ["ast", "break", "chore", "cli", "docs", "feat", "fix", "misc", "tests", "break"]]
}
};
67 changes: 38 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"lint:codeOnly": "eslint \"{bin}/**/!(__testfixtures__)/*.js\" \"{bin}/**.js\"",
"lint": "eslint \"./bin/*.js\" \"./test/**/*.js\" \"packages/**/!(node_modules)/*.test.js\"",
"precommit": "lint-staged",
"commitmsg": "commitlint -E GIT_PARAMS",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep this simply as commit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"pretest": "npm run build && npm run lint && npm run tslint",
"reportCoverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json --disable=gcov",
"test": "nyc jest",
Expand All @@ -47,6 +48,10 @@
"{packages,bin}/**/!(__testfixtures__)/**.js": [
"eslint --fix",
"git add"
],
"{packages,bin}/**/!(__testfixtures__)/**.ts": [
"tslint --fix",
"git add"
]
},
"jest": {
Expand Down Expand Up @@ -106,7 +111,6 @@
},
"devDependencies": {
"@commitlint/cli": "^7.1.2",
"@commitlint/config-angular": "^7.1.2",
"@commitlint/config-lerna-scopes": "^7.1.2",
"@commitlint/prompt-cli": "^7.1.2",
"@commitlint/travis-cli": "^7.1.2",
Expand Down