Skip to content

Commit

Permalink
feat(commitlint): add commitlint shareable config
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed May 31, 2021
1 parent f12a966 commit d7cf8a3
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 0 deletions.
55 changes: 55 additions & 0 deletions packages/commitlint-config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# OS files
.DS_Store
Thumbs.db

# Logs
logs
!services/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
compiled

# Outputs
dist
**/docs/api

# Dependency directories
node_modules
jspm_packages

# Optional cache directories
.npm
.awcache
.rpt2_cache

# Optional REPL history
.node_repl_history

# JetBrains IDEs
.idea
.vscode
1 change: 1 addition & 0 deletions packages/commitlint-config/.lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@radicalcondor/internal').lintStaged;
3 changes: 3 additions & 0 deletions packages/commitlint-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
src/
!dist/*
1 change: 1 addition & 0 deletions packages/commitlint-config/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
access=public
1 change: 1 addition & 0 deletions packages/commitlint-config/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@radicalcondor/internal').prettier;
4 changes: 4 additions & 0 deletions packages/commitlint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7 changes: 7 additions & 0 deletions packages/commitlint-config/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2021 Radical Condor <hello@radicalcondor.dev>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 changes: 27 additions & 0 deletions packages/commitlint-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[![MIT Licensed][icon-license]][link-license]
[![NPM Version][icon-npm]][link-npm]
[![Test Coverage][icon-coverage]][link-coverage]

CommitLint config for Radical Condor repositories

## Installation

```bash
yarn add -D @radicalcondor/commitlint-config
npx install-peerdeps @radicalcondor/commitlint-config
```

## Usage

Create a `.commitlintrc.js` in your project with the following:

```js
module.exports = require('@radicalcondor/commitlint-config');
```

[icon-license]: https://img.shields.io/github/license/cubedevinc/config.svg?longCache=true&style=flat-square
[link-license]: LICENSE
[icon-npm]: https://img.shields.io/npm/v/@radicalcondor/commitlint-config.svg?longCache=true&style=flat-square
[link-npm]: https://www.npmjs.com/package/@radicalcondor/commitlint-config
[icon-coverage]: https://img.shields.io/codecov/c/github/cubedevinc/config/develop.svg?longCache=true&style=flat-square
[link-coverage]: https://codecov.io/gh/cubedevinc/config
47 changes: 47 additions & 0 deletions packages/commitlint-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "@radicalcondor/commitlint-config",
"description": "CommitLint config for Radical Condor repositories",
"version": "0.3.1",
"license": "MIT",
"main": "src/index.json",
"keywords": [
"radicalcondor",
"commitlint",
"commitlint-config"
],
"author": {
"name": "Radical Condor",
"url": "https://github.com/radicalcondor"
},
"homepage": "https://github.com/radicalcondor/config",
"repository": {
"type": "git",
"url": "https://github.com/radicalcondor/config.git",
"directory": "packages/commitlint-config"
},
"engines": {
"node": ">=10"
},
"scripts": {
"precommit": "lint-staged",
"pretest": "curl https://json.schemastore.org/commitlintrc.json > src/schema.json && ajv migrate -s src/schema.json",
"test": "ajv validate -s src/schema.json -d src/index.json --errors=json",
"posttest": "rimraf src/schema.json src/schema.json.bak",
"build": "echo '0'",
"lint": "prettier src/** --write"
},
"peerDependencies": {
"jest": ">=26",
"ts-jest": ">=26"
},
"devDependencies": {
"@radicalcondor/internal": "^0.3.0",
"ajv-cli": "^5",
"lint-staged": "^11",
"prettier": "^2",
"rimraf": "^3"
},
"publishConfig": {
"access": "public"
}
}
3 changes: 3 additions & 0 deletions packages/commitlint-config/src/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}

0 comments on commit d7cf8a3

Please sign in to comment.