@commitlint/config-patternplate
Advanced tools
Comparing version
15
index.js
@@ -1,5 +0,7 @@ | ||
const glob = require('glob'); | ||
const path = require('path'); | ||
const merge = require('lodash.merge'); | ||
import path from 'path'; | ||
import configAngular from '@commitlint/config-angular'; | ||
import {glob} from 'glob'; | ||
import merge from 'lodash.merge'; | ||
function pathToId(root, filePath) { | ||
@@ -10,9 +12,10 @@ const relativePath = path.relative(root, filePath); | ||
function getPatternIDs() { | ||
async function getPatternIDs() { | ||
const root = path.resolve(process.cwd(), './patterns'); | ||
const pattern = path.resolve(root, '**/pattern.json'); | ||
return glob.sync(pattern).map((result) => pathToId(root, result)); | ||
const files = glob(pattern); | ||
return files.map((result) => pathToId(root, result)); | ||
} | ||
module.exports = merge(require('@commitlint/config-angular'), { | ||
export default merge(configAngular, { | ||
rules: { | ||
@@ -19,0 +22,0 @@ 'scope-enum': () => |
{ | ||
"name": "@commitlint/config-patternplate", | ||
"version": "18.6.1", | ||
"type": "module", | ||
"version": "19.0.0", | ||
"description": "Lint your commits, patternplate-style", | ||
@@ -33,11 +34,11 @@ "files": [ | ||
"dependencies": { | ||
"@commitlint/config-angular": "^18.6.1", | ||
"glob": "^8.0.3", | ||
"@commitlint/config-angular": "^19.0.0", | ||
"glob": "^10.3.10", | ||
"lodash.merge": "^4.6.2" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/utils": "^18.6.1", | ||
"@commitlint/utils": "^19.0.0", | ||
"@types/lodash.merge": "^4.6.8" | ||
}, | ||
"gitHead": "89f5bf91d1c11b1f457a6f0d99b8ea34583a9311" | ||
"gitHead": "f1ff12159d627ee63bf8982ab02e6cca8f10b09f" | ||
} |
@@ -1,5 +0,5 @@ | ||
> Lint your commits, patternplate-style | ||
# @commitlint/config-patternplate | ||
Lint your commits, patternplate-style | ||
Shareable `commitlint` config enforcing the patternplate commit convention. | ||
@@ -30,2 +30,2 @@ Use with [@commitlint/cli](../cli) and [@commitlint/prompt-cli](../prompt-cli). | ||
Consult [docs/rules](https://conventional-changelog.github.io/commitlint/#/reference-rules) for a list of available rules. | ||
Consult [Rules reference](https://commitlint.js.org/reference/rules) for a list of available rules. |
3847
1%20
11.11%Yes
NaN+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated