Skip to content

Commit 0d95f99

Browse files
committed
refactor 🎨(core): change rules for commit enabled emoji (#18)
Signed-off-by: Luis Mayta <luis@hadenlabs.com>
1 parent de7f3f4 commit 0d95f99

File tree

4 files changed

+119
-106
lines changed

4 files changed

+119
-106
lines changed

‎.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ jobs:
4747

4848
- if: steps.publish.outputs.type != 'none'
4949
run: |
50-
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
50+
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"

‎commitlint.config.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎index.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
module.exports = {
2+
parserPreset: {
3+
parserOpts: {
4+
headerPattern: /^(\w+)(?:\s*.*)?(?:\s*\((.*?)\))?:\s*(.*)$/,
5+
headerCorrespondence: ["type", "scope", "subject"]
6+
}
7+
},
8+
rules: {
9+
"body-leading-blank": [2, "always"],
10+
"footer-leading-blank": [2, "always"],
11+
"header-max-length": [2, "always", 80],
12+
"scope-case": [2, "always", "lower-case"],
13+
"subject-case": [
14+
2,
15+
"never",
16+
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
17+
],
18+
"subject-empty": [2, "never"],
19+
"subject-exclamation-mark": [2, "never"],
20+
"subject-full-stop": [2, "never", "."],
21+
"type-case": [2, "always", "lower-case"],
22+
"type-empty": [2, "never"],
23+
"type-enum": [
24+
2,
25+
"always",
26+
[
27+
"build",
28+
"chore",
29+
"ci",
30+
"docs",
31+
"feat",
32+
"fix",
33+
"perf",
34+
"refactor",
35+
"revert",
36+
"style",
37+
"test",
38+
"sample"
39+
]
40+
]
41+
}
42+
}

‎package.json

Lines changed: 76 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,77 @@
11
{
2-
"name": "@hadenlabs/commitlint-config",
3-
"version": "1.0.1",
4-
"description": "commitlint-config for git commit",
5-
"author": "Luis Mayta <slovacus@gmail.com>",
6-
"license": "LGPL-3.0",
7-
"main": "commitlint.config.js",
8-
"scripts": {
9-
"build": "tsc -p",
10-
"build:tool": "yarn run build ./tools/",
11-
"clean": "rimraf -rf dist",
12-
"clean:all": "yarn clean:cache && yarn clean:build:all && yarn clean node_modules",
13-
"clean:build": "yarn clean dist .next out .serverless_nextjs",
14-
"clean:build:all": "yarn clean && yarn clean:build && yarn clean:build:tool && yarn clean:build:test",
15-
"clean:build:test": "yarn clean ./coverage",
16-
"clean:build:tool": "yarn clean ./build/tools",
17-
"clean:cache": "yarn clean ./node_modules/.cache",
18-
"lint": "eslint --config=.ci/linters/.eslintrc.js --ignore-path=.ci/linters/.eslintignore ./ --ext .js,.jsx,.mjs,.d.ts,.ts,.tsx",
19-
"lint:fix": "yarn lint --fix",
20-
"lint:less": "stylelint --config=.ci/linters/.stylintrc --syntax less **/*.less",
21-
"lint:less:fix": "yarn lint:less --fix",
22-
"prebuild": "yarn run clean",
23-
"precommit": "lint-staged",
24-
"prettier": "prettier --config=.ci/linters/prettier.config.js --ignore-path=.ci/linters/.prettierignore",
25-
"prettier:fix": "yarn prettier:lint --write=true",
26-
"prettier:lint": "yarn prettier '**/*.{js?(on),ts?(x),scss,md,y?(a)ml,gql,graphql?(s),less,mjml}' --write=false --list-different"
27-
},
28-
"publishConfig": {
29-
"access": "public",
30-
"registry": "https://registry.npmjs.org/"
31-
},
32-
"husky": {
33-
"hooks": {
34-
"pre-commit": "yarn precommit",
35-
"commit-msg": "commitlint --config=.ci/linters/.commitlintrc.json -E HUSKY_GIT_PARAMS"
36-
}
37-
},
38-
"repository": {
39-
"type": "git",
40-
"url": "git+https://github.com/hadenlabs/commitlint-config.git"
41-
},
42-
"keywords": [
43-
"commitlint",
44-
"git",
45-
"commits",
46-
"hadenlabs"
47-
],
48-
"bugs": {
49-
"url": "https://github.com/hadenlabs/commitlint-config/issues"
50-
},
51-
"homepage": "https://github.com/hadenlabs/commitlint-config#readme",
52-
"dependencies": {
53-
"husky": "^5.1.3",
54-
"@commitlint/cli": "^12.1.1",
55-
"@commitlint/config-conventional": "^12.1.1"
56-
},
57-
"devDependencies": {
58-
"@babel/eslint-parser": "^7.13.14",
59-
"@typescript-eslint/eslint-plugin": "^4.22.0",
60-
"@typescript-eslint/parser": "^4.22.0",
61-
"babel-cli": "^6.26.0",
62-
"eslint": "^7.24.0",
63-
"eslint-config-prettier": "^8.2.0",
64-
"eslint-plugin-import": "^2.22.1",
65-
"eslint-plugin-prettier": "^3.4.0",
66-
"eslint-plugin-promise": "^5.1.0",
67-
"husky": "^6.0.0",
68-
"lint-staged": "^10.5.4",
69-
"prettier": "^2.2.1",
70-
"prettier-tslint": "^0.4.2",
71-
"rimraf": "^3.0.2",
72-
"semantic-release": "^17.4.2",
73-
"shelljs": "^0.8.4",
74-
"stylelint": "^13.12.0",
75-
"stylelint-config-standard": "^21.0.0",
76-
"ts-node": "^9.1.1",
77-
"typescript": "^4.2.4"
78-
},
79-
"prettier": ".ci/linters/prettier.config.js",
80-
"stylintrc": ".ci/linters/.stylintrc"
81-
}
2+
"name": "@hadenlabs/commitlint-config",
3+
"version": "1.0.1",
4+
"description": "commitlint-config for git commit",
5+
"author": "Luis Mayta <slovacus@gmail.com>",
6+
"license": "LGPL-3.0",
7+
"main": "index.js",
8+
"files": ["index.js"],
9+
"scripts": {
10+
"build": "tsc -p",
11+
"build:tool": "yarn run build ./tools/",
12+
"clean": "rimraf -rf dist",
13+
"clean:all": "yarn clean:cache && yarn clean:build:all && yarn clean node_modules",
14+
"clean:build": "yarn clean dist .next out .serverless_nextjs",
15+
"clean:build:all": "yarn clean && yarn clean:build && yarn clean:build:tool && yarn clean:build:test",
16+
"clean:build:test": "yarn clean ./coverage",
17+
"clean:build:tool": "yarn clean ./build/tools",
18+
"clean:cache": "yarn clean ./node_modules/.cache",
19+
"lint": "eslint --config=.ci/linters/.eslintrc.js --ignore-path=.ci/linters/.eslintignore ./ --ext .js,.jsx,.mjs,.d.ts,.ts,.tsx",
20+
"lint:fix": "yarn lint --fix",
21+
"lint:less": "stylelint --config=.ci/linters/.stylintrc --syntax less **/*.less",
22+
"lint:less:fix": "yarn lint:less --fix",
23+
"prebuild": "yarn run clean",
24+
"precommit": "lint-staged",
25+
"prettier": "prettier --config=.ci/linters/prettier.config.js --ignore-path=.ci/linters/.prettierignore",
26+
"prettier:fix": "yarn prettier:lint --write=true",
27+
"prettier:lint": "yarn prettier '**/*.{js?(on),ts?(x),scss,md,y?(a)ml,gql,graphql?(s),less,mjml}' --write=false --list-different"
28+
},
29+
"publishConfig": {
30+
"access": "public",
31+
"registry": "https://registry.npmjs.org/"
32+
},
33+
"husky": {
34+
"hooks": {
35+
"pre-commit": "yarn precommit",
36+
"commit-msg": "commitlint --config=.ci/linters/.commitlintrc.json -E HUSKY_GIT_PARAMS"
37+
}
38+
},
39+
"repository": {
40+
"type": "git",
41+
"url": "git+https://github.com/hadenlabs/commitlint-config.git"
42+
},
43+
"keywords": ["commitlint", "git", "commits", "hadenlabs"],
44+
"bugs": {
45+
"url": "https://github.com/hadenlabs/commitlint-config/issues"
46+
},
47+
"homepage": "https://github.com/hadenlabs/commitlint-config#readme",
48+
"dependencies": {
49+
"husky": "^5.1.3",
50+
"@commitlint/cli": "^12.1.1",
51+
"@commitlint/config-conventional": "^12.1.1"
52+
},
53+
"devDependencies": {
54+
"@babel/eslint-parser": "^7.13.14",
55+
"@typescript-eslint/eslint-plugin": "^4.22.0",
56+
"@typescript-eslint/parser": "^4.22.0",
57+
"babel-cli": "^6.26.0",
58+
"eslint": "^7.24.0",
59+
"eslint-config-prettier": "^8.2.0",
60+
"eslint-plugin-import": "^2.22.1",
61+
"eslint-plugin-prettier": "^3.4.0",
62+
"eslint-plugin-promise": "^5.1.0",
63+
"husky": "^6.0.0",
64+
"lint-staged": "^10.5.4",
65+
"prettier": "^2.2.1",
66+
"prettier-tslint": "^0.4.2",
67+
"rimraf": "^3.0.2",
68+
"semantic-release": "^17.4.2",
69+
"shelljs": "^0.8.4",
70+
"stylelint": "^13.12.0",
71+
"stylelint-config-standard": "^21.0.0",
72+
"ts-node": "^9.1.1",
73+
"typescript": "^4.2.4"
74+
},
75+
"prettier": ".ci/linters/prettier.config.js",
76+
"stylintrc": ".ci/linters/.stylintrc"
77+
}

0 commit comments

Comments
 (0)