mirror of
https://github.com/ivuorinen/base-configs.git
synced 2026-02-10 17:46:32 +00:00
Initial commit
This commit is contained in:
5
packages/commitlint-config/.commitlintrc.json
Normal file
5
packages/commitlint-config/.commitlintrc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": [
|
||||
"@ivuorinen/commitlint-config"
|
||||
]
|
||||
}
|
||||
3
packages/commitlint-config/CHANGELOG.md
Normal file
3
packages/commitlint-config/CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
21
packages/commitlint-config/LICENSE
Normal file
21
packages/commitlint-config/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Ismo Vuorinen
|
||||
|
||||
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.
|
||||
62
packages/commitlint-config/README.md
Normal file
62
packages/commitlint-config/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# @ivuorinen/commitlint-config <!-- omit in toc -->
|
||||
|
||||
[![npm package][npm-badge]][npm-link] [![license MIT][license-badge]][license-link] [![ivuorinen's Code Style][style-badge]][style-link]
|
||||
|
||||
> ivuorinen's shareable configuration for [`CommitLint`][commitlint-link].
|
||||
|
||||
## Table of Contents <!-- omit in toc -->
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Documentations](#documentations)
|
||||
- [Contributing](#contributing)
|
||||
- [Changelog](#changelog)
|
||||
- [License](#license)
|
||||
|
||||
## Installation
|
||||
|
||||
Install `this config` as a _`devDependencies`_:
|
||||
|
||||
```sh
|
||||
# npm
|
||||
npm install @ivuorinen/commitlint-config --save-dev
|
||||
|
||||
# Yarn
|
||||
yarn add @ivuorinen/commitlint-config --dev
|
||||
```
|
||||
|
||||
After installing it, a _`.commitlintrc.json`_ file will be created automatically in the project's root folder with the following configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"extends": ["@ivuorinen/commitlint-config"]
|
||||
}
|
||||
```
|
||||
|
||||
## Documentations
|
||||
|
||||
Read the [CommitLint docs][commitlint-docs-link] for more information.
|
||||
|
||||
## Contributing
|
||||
|
||||
If you are interested in helping contribute, please take a look at our [contribution guidelines][contributing-link] and open an [issue][issue-link] or [pull request][pull-request-link].
|
||||
|
||||
## Changelog
|
||||
|
||||
See [CHANGELOG][changelog-link] for a human-readable history of changes.
|
||||
|
||||
## License
|
||||
|
||||
Distributed under the MIT License. See [LICENSE][license-link] for more information.
|
||||
|
||||
[changelog-link]: ./CHANGELOG.md
|
||||
[commitlint-docs-link]: https://commitlint.js.org
|
||||
[commitlint-link]: https://github.com/conventional-changelog/commitlint
|
||||
[contributing-link]: https://github.com/ivuorinen/.github/blob/main/CONTRIBUTING.md
|
||||
[issue-link]: https://github.com/ivuorinen/base-configs/issues
|
||||
[license-badge]: https://img.shields.io/github/license/ivuorinen/base-configs?style=flat-square&labelColor=292a44&color=663399
|
||||
[license-link]: ./LICENSE
|
||||
[npm-badge]: https://img.shields.io/npm/v/@ivuorinen/commitlint-config?style=flat-square&labelColor=292a44&color=663399
|
||||
[npm-link]: https://www.npmjs.com/package/@ivuorinen/commitlint-config
|
||||
[pull-request-link]: https://github.com/ivuorinen/base-configs/pulls
|
||||
[style-badge]: https://img.shields.io/badge/code_style-ivuorinen%E2%80%99s-663399.svg?labelColor=292a44&style=flat-square
|
||||
[style-link]: https://github.com/ivuorinen/base-configs
|
||||
8
packages/commitlint-config/index.js
Normal file
8
packages/commitlint-config/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'body-leading-blank': [2, 'always']
|
||||
}
|
||||
}
|
||||
43
packages/commitlint-config/package.json
Normal file
43
packages/commitlint-config/package.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@ivuorinen/commitlint-config",
|
||||
"version": "0.1.0",
|
||||
"description": "ivuorinen's shareable configuration for commitlint.",
|
||||
"author": {
|
||||
"name": "Ismo Vuorinen",
|
||||
"url": "https://github.com/ivuorinen"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ivuorinen/base-configs/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12",
|
||||
"npm": ">= 6",
|
||||
"yarn": ">=1.20.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"scripts/*"
|
||||
],
|
||||
"homepage": "https://github.com/ivuorinen/base-configs/tree/main/packages/commitlint-config#readme",
|
||||
"keywords": [
|
||||
"commitlint-config",
|
||||
"commitlint",
|
||||
"config"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ivuorinen/base-configs.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node scripts/postinstall.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@commitlint/cli": "17.3.0",
|
||||
"@commitlint/config-conventional": "17.3.0"
|
||||
}
|
||||
}
|
||||
14
packages/commitlint-config/scripts/postinstall.js
Normal file
14
packages/commitlint-config/scripts/postinstall.js
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const filePath = path.join(process.env.INIT_CWD, '.commitlintrc.json')
|
||||
|
||||
const fileConfigObject = {
|
||||
extends: ['@ivuorinen/commitlint-config']
|
||||
}
|
||||
|
||||
if (!fs.existsSync(filePath)) {
|
||||
fs.writeFileSync(filePath, JSON.stringify(fileConfigObject, undefined, 2))
|
||||
}
|
||||
Reference in New Issue
Block a user