New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

commitlint-config-cozy

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commitlint-config-cozy - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

<a name="0.3.0"></a>
# [0.3.0](https://github.com/cozy/cozy-libs/compare/commitlint-config-cozy@0.2.4...commitlint-config-cozy@0.3.0) (2018-09-17)
### Features
* Add commitlint cli on dependency ⚙️ ([8a5652d](https://github.com/cozy/cozy-libs/commit/8a5652d))
* Add limitation on body 📏 ([dc33f61](https://github.com/cozy/cozy-libs/commit/dc33f61))
<a name="0.2.4"></a>

@@ -8,0 +20,0 @@ ## [0.2.4](https://github.com/cozy/cozy-libs/compare/commitlint-config-cozy@0.2.3...commitlint-config-cozy@0.2.4) (2018-08-30)

1

index.js
module.exports = {
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 72],
'footer-leading-blank': [1, 'always'],

@@ -5,0 +6,0 @@ 'header-max-length': [2, 'always', 50],

15

index.spec.js
import lint from '@commitlint/lint'
import cozyConfig from '.'
import { rules } from '.'
const rules = cozyConfig.rules
// const TOO_LONG =
// 'This is an invalid sentence since it has too much character !!!!!!!!!!!!!'
const TOO_LONG = `It's an example of invalid sentence since it has more than 72 characters!`

@@ -59,3 +57,2 @@ describe('Commitlint Config Cozy', () => {

/*
describe('Body', () => {

@@ -68,9 +65,11 @@ it('respect max length', async () => {

const invalidBody = [`fix: Bar\n\n${TOO_LONG}`]
const invalidBody = [
`fix: Bar\n\n${TOO_LONG}`,
`fix: Bar\n\nWith a small body\n${TOO_LONG}`
]
for (const body of invalidBody) {
expect((await lint(`${body}`, rules)).valid).toBeFalsy()
expect((await lint(body, rules)).valid).toBeFalsy()
}
})
})
*/
})
{
"name": "commitlint-config-cozy",
"version": "0.2.4",
"version": "0.3.0",
"description": "Shareable commitlint config enforcing the cozy commit convention",

@@ -21,3 +21,3 @@ "main": "index.js",

"devDependencies": {
"@commitlint/lint": "7.0.0",
"@commitlint/lint": "7.1.2",
"babel-cli": "6.26.0",

@@ -28,3 +28,6 @@ "babel-jest": "23.4.2",

"jest": "23.4.2"
},
"dependencies": {
"@commitlint/cli": "7.1.2"
}
}

@@ -10,3 +10,21 @@ # Commitlint Config Cozy

## How to add it on your project
- Add the library on your dev dependency (`yarn add commitlint-config-cozy --dev --exact`)
- Add configuration on your `package.json` ([see an example](https://github.com/cozy/cozy-banks/blob/85572b6827cdaa45c1ed44d6922829ba6480b3c9/package.json#L242-L246)):
```json
"commitlint": {
"extends": [
"./packages/commitlint-config"
]
}
```
- Add verification during a commit on your `package.json` ([see an example](https://github.com/cozy/cozy-banks/blob/85572b6827cdaa45c1ed44d6922829ba6480b3c9/package.json#L65)):
```
"scripts": {
"commitmsg": "commitlint -e $GIT_PARAMS"
...
}
```
## Community

@@ -13,0 +31,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc