Skip to content

Commit d6dd0c2

Browse files
authored
chore(lint): introduce commitlint (carbon-design-system#2155)
Also introduces 50/72 rule.
1 parent a9248eb commit d6dd0c2

File tree

132 files changed

+614
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+614
-511
lines changed
15.5 KB
Binary file not shown.
12.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9.35 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
7.08 KB
Binary file not shown.
6.49 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20.8 KB
Binary file not shown.
136 KB
Binary file not shown.
-3.08 KB
Binary file not shown.
1.05 KB
Binary file not shown.
-123 KB
Binary file not shown.
129 KB
Binary file not shown.
-2.15 KB
Binary file not shown.
2.15 KB
Binary file not shown.

.yarn-offline-mirror/chalk-2.3.1.tgz

9.12 KB
Binary file not shown.
-4.47 KB
Binary file not shown.
-1.6 KB
Binary file not shown.

.yarn-offline-mirror/colors-0.6.2.tgz

-6.14 KB
Binary file not shown.
-7.66 KB
Binary file not shown.
-107 KB
Binary file not shown.
1.47 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
599 KB
Binary file not shown.
13.2 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

.yarn-offline-mirror/dargs-4.1.0.tgz

2.87 KB
Binary file not shown.
1.94 KB
Binary file not shown.

.yarn-offline-mirror/dedent-0.6.0.tgz

-2.32 KB
Binary file not shown.

.yarn-offline-mirror/del-3.0.0.tgz

2.85 KB
Binary file not shown.
-3.08 KB
Binary file not shown.
2.26 KB
Binary file not shown.

.yarn-offline-mirror/execa-0.9.0.tgz

-6.72 KB
Binary file not shown.
-1006 Bytes
Binary file not shown.
-1.56 KB
Binary file not shown.
-4.91 KB
Binary file not shown.
-1.9 KB
Binary file not shown.
-2.19 KB
Binary file not shown.

.yarn-offline-mirror/findup-0.1.5.tgz

-3.17 KB
Binary file not shown.
-1.41 KB
Binary file not shown.
1.55 KB
Binary file not shown.
-2.52 KB
Binary file not shown.
-28.3 KB
Binary file not shown.
2.97 KB
Binary file not shown.
1.86 KB
Binary file not shown.
3.71 KB
Binary file not shown.

.yarn-offline-mirror/glob-7.1.1.tgz

-15.3 KB
Binary file not shown.
2.3 KB
Binary file not shown.
-2.31 KB
Binary file not shown.
-3.19 KB
Binary file not shown.

.yarn-offline-mirror/globby-6.1.0.tgz

3.02 KB
Binary file not shown.

.yarn-offline-mirror/husky-1.2.0.tgz

-11.2 KB
Binary file not shown.

.yarn-offline-mirror/husky-1.3.1.tgz

11.7 KB
Binary file not shown.
1.8 KB
Binary file not shown.
-16.8 KB
Binary file not shown.
-17.1 KB
Binary file not shown.

.yarn-offline-mirror/is-ci-1.2.1.tgz

-1.89 KB
Binary file not shown.
745 Bytes
Binary file not shown.
1.43 KB
Binary file not shown.
1.44 KB
Binary file not shown.
1.52 KB
Binary file not shown.
-1.49 KB
Binary file not shown.
-774 Bytes
Binary file not shown.
-5.34 KB
Binary file not shown.
71.9 KB
Binary file not shown.
8.35 KB
Binary file not shown.
-13.6 KB
Binary file not shown.
16.6 KB
Binary file not shown.
-298 KB
Binary file not shown.
Binary file not shown.
-15.2 KB
Binary file not shown.
9.96 KB
Binary file not shown.
Binary file not shown.
-2.02 KB
Binary file not shown.
2.03 KB
Binary file not shown.
2.49 KB
Binary file not shown.

.yarn-offline-mirror/meow-4.0.1.tgz

3.77 KB
Binary file not shown.

.yarn-offline-mirror/meow-5.0.0.tgz

4.1 KB
Binary file not shown.

.yarn-offline-mirror/merge-1.2.1.tgz

-2.76 KB
Binary file not shown.
2.01 KB
Binary file not shown.
-3.48 KB
Binary file not shown.
-18.3 KB
Binary file not shown.
-1.82 KB
Binary file not shown.
-64 KB
Binary file not shown.

.yarn-offline-mirror/opn-4.0.2.tgz

-8.38 KB
Binary file not shown.
-3.64 KB
Binary file not shown.
-2.18 KB
Binary file not shown.
1.96 KB
Binary file not shown.
-144 KB
Binary file not shown.
4.91 KB
Binary file not shown.

.yarn-offline-mirror/q-1.5.1.tgz

35.9 KB
Binary file not shown.
2.47 KB
Binary file not shown.
2.01 KB
Binary file not shown.

.yarn-offline-mirror/redent-2.0.0.tgz

1.57 KB
Binary file not shown.
-2.5 KB
Binary file not shown.
2.1 KB
Binary file not shown.
1.7 KB
Binary file not shown.
-1.43 KB
Binary file not shown.
-1.32 KB
Binary file not shown.

.yarn-offline-mirror/rx-4.1.0.tgz

-1.11 MB
Binary file not shown.
-999 Bytes
Binary file not shown.
-47.6 KB
Binary file not shown.
27.3 KB
Binary file not shown.
-5.98 KB
Binary file not shown.

.yarn-offline-mirror/split2-2.2.0.tgz

3.84 KB
Binary file not shown.
-5.78 KB
Binary file not shown.
5.77 KB
Binary file not shown.
1.71 KB
Binary file not shown.
Binary file not shown.
1.88 KB
Binary file not shown.

.yarn-offline-mirror/tmp-0.0.29.tgz

-11.3 KB
Binary file not shown.
5.73 KB
Binary file not shown.
1.54 KB
Binary file not shown.
1.57 KB
Binary file not shown.
Binary file not shown.
-4 KB
Binary file not shown.
13.2 KB
Binary file not shown.

.yarn-offline-mirror/yup-0.26.10.tgz

33 KB
Binary file not shown.

package.json

+14-28
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@
162162
"@babel/plugin-transform-object-assign": "^7.0.0",
163163
"@babel/preset-env": "^7.1.0",
164164
"@babel/preset-react": "^7.0.0",
165+
"@commitlint/cli": "^7.5.0",
166+
"@commitlint/config-conventional": "^7.5.0",
165167
"@storybook/addon-a11y": "~4.0.12",
166168
"@storybook/addon-actions": "~4.0.12",
167169
"@storybook/addon-info": "~4.0.12",
@@ -183,10 +185,8 @@
183185
"carbon-icons": "^7.0.5",
184186
"chalk": "^2.3.0",
185187
"cli-table": "^0.3.0",
186-
"commitizen": "^2.9.5",
187188
"cross-env": "^5.2.0",
188189
"css-loader": "^1.0.1",
189-
"cz-conventional-changelog-components": "^1.0.0",
190190
"enzyme": "^3.9.0",
191191
"enzyme-adapter-react-16": "^1.11.0",
192192
"enzyme-to-json": "^3.3.4",
@@ -195,11 +195,11 @@
195195
"eslint-plugin-jsx-a11y": "^6.1.2",
196196
"eslint-plugin-react": "^7.11.1",
197197
"gzip-size": "^5.0.0",
198-
"husky": "^1.1.2",
198+
"husky": "^1.3.0",
199199
"jest": "^24.0.0",
200200
"jest-circus": "^24.0.0",
201201
"lcov2badge": "^0.1.0",
202-
"lint-staged": "^7.3.0",
202+
"lint-staged": "^8.0.0",
203203
"mini-css-extract-plugin": "^0.4.4",
204204
"node-sass": "4.10.0",
205205
"object-assign": "^4.1.1",
@@ -224,7 +224,6 @@
224224
"storybook-readme": "^4.0.2",
225225
"string-replace-loader": "^2.1.0",
226226
"terser-webpack-plugin": "^1.1.0",
227-
"validate-commit-msg": "^2.10.1",
228227
"webpack": "^4.25.1",
229228
"whatwg-fetch": "^2.0.3"
230229
},
@@ -268,9 +267,18 @@
268267
"@babel/plugin-proposal-do-expressions"
269268
]
270269
},
270+
"commitlint": {
271+
"extends": [
272+
"@commitlint/config-conventional"
273+
],
274+
"rules": {
275+
"header-max-length": [2, "always", 50],
276+
"body-max-line-length": [2, "always", 72]
277+
}
278+
},
271279
"husky": {
272280
"hooks": {
273-
"commit-msg": "validate-commit-msg",
281+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
274282
"pre-commit": "lint-staged"
275283
}
276284
},
@@ -291,28 +299,6 @@
291299
"git add"
292300
]
293301
},
294-
"config": {
295-
"validate-commit-msg": {
296-
"types": [
297-
"feat",
298-
"fix",
299-
"docs",
300-
"style",
301-
"refactor",
302-
"perf",
303-
"test",
304-
"chore",
305-
"revert"
306-
],
307-
"warnOnFail": false,
308-
"maxSubjectLength": 100,
309-
"subjectPattern": ".+",
310-
"subjectPatternErrorMsg": "Subject does not match subject pattern!"
311-
},
312-
"commitizen": {
313-
"path": "./node_modules/cz-conventional-changelog-components"
314-
}
315-
},
316302
"repository": {
317303
"type": "git",
318304
"url": "https://github.com/IBM/carbon-components-react.git"

0 commit comments

Comments
 (0)