Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .commitlintrc.js → .commitlintrc.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
extends: ['./packages/commitlint-config'],
rules: {
'scope-enum': [
Expand Down
34 changes: 14 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@ This monorepo contains shareable configurations for various coding-style/best pr

## Available Configurations

| Tool | Package | Version |
| ---------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| Browserslist | [@lmc-eu/browserslist-config](packages/browserslist-config) | [![@lmc-eu/browserslist-config][blc-badge]][blc-npm] |
| Commitlint | [@lmc-eu/commitlint-config](packages/commitlint-config) | [![@lmc-eu/commitlint-config][clc-badge]][clc-npm] |
| Conventional Changelog | [@lmc-eu/conventional-changelog-lmc-bitbucket](packages/conventional-changelog-lmc-bitbucket) | [![@lmc-eu/conventional-changelog-lmc-bitbucket][cc-bb-badge]][cc-bb-npm] |
| Conventional Changelog | [@lmc-eu/conventional-changelog-lmc-github](packages/conventional-changelog-lmc-github) | [![@lmc-eu/conventional-changelog-lmc-github][cc-gh-badge]][cc-gh-npm] |
| ESLint | [@lmc-eu/eslint-config-base](packages/eslint-config-base) | [![@lmc-eu/eslint-config-base][ec-base-badge]][ec-base-npm] |
| ESLint | [@lmc-eu/eslint-config-graphql](packages/eslint-config-graphql) | [![@lmc-eu/eslint-config-graphql][ec-gql-badge]][ec-gql-npm] |
| ESLint | [@lmc-eu/eslint-config-react](packages/eslint-config-react) | [![@lmc-eu/eslint-config-react][ec-react-badge]][ec-react-npm] |
| ESLint | [@lmc-eu/eslint-config-jest](packages/eslint-config-jest) | [![@lmc-eu/eslint-config-jest][ec-jest-badge]][ec-jest-npm] |
| ESLint | [@lmc-eu/eslint-config-typescript](packages/eslint-config-typescript) | [![@lmc-eu/eslint-config-typescript][ec-ts-badge]][ec-ts-npm] |
| Prettier | [@lmc-eu/prettier-config](packages/prettier-config) | [![@lmc-eu/prettier-config][pc-badge]][pc-npm] |
| Renovate | [@lmc-eu/renovate-config](packages/renovate-config) | [![@lmc-eu/renovate-config][rc-badge]][rc-npm] |
| Remark | [@almacareer/remark-config](packages/remark-config) | [![@almacareer/remark-config][rmc-badge]][rmc-npm] |
| Stylelint | [@almacareer/stylelint-config](packages/stylelint-config) | [![@almacareer/stylelint-config][slc-badge]][slc-npm] |
| Textlint | [@lmc-eu/textlint-rule-preset-lmc](packages/textlint-rule-preset-lmc) | [![@lmc-eu/textlint-rule-preset-lmc][tlc-badge]][tlc-npm] |
| Tool | Package | Version |
| ------------ | --------------------------------------------------------------------- | -------------------------------------------------------------- |
| Browserslist | [@lmc-eu/browserslist-config](packages/browserslist-config) | [![@lmc-eu/browserslist-config][blc-badge]][blc-npm] |
| Commitlint | [@lmc-eu/commitlint-config](packages/commitlint-config) | [![@lmc-eu/commitlint-config][clc-badge]][clc-npm] |
| ESLint | [@lmc-eu/eslint-config-base](packages/eslint-config-base) | [![@lmc-eu/eslint-config-base][ec-base-badge]][ec-base-npm] |
| ESLint | [@lmc-eu/eslint-config-graphql](packages/eslint-config-graphql) | [![@lmc-eu/eslint-config-graphql][ec-gql-badge]][ec-gql-npm] |
| ESLint | [@lmc-eu/eslint-config-react](packages/eslint-config-react) | [![@lmc-eu/eslint-config-react][ec-react-badge]][ec-react-npm] |
| ESLint | [@lmc-eu/eslint-config-jest](packages/eslint-config-jest) | [![@lmc-eu/eslint-config-jest][ec-jest-badge]][ec-jest-npm] |
| ESLint | [@lmc-eu/eslint-config-typescript](packages/eslint-config-typescript) | [![@lmc-eu/eslint-config-typescript][ec-ts-badge]][ec-ts-npm] |
| Prettier | [@lmc-eu/prettier-config](packages/prettier-config) | [![@lmc-eu/prettier-config][pc-badge]][pc-npm] |
| Renovate | [@lmc-eu/renovate-config](packages/renovate-config) | [![@lmc-eu/renovate-config][rc-badge]][rc-npm] |
| Remark | [@almacareer/remark-config](packages/remark-config) | [![@almacareer/remark-config][rmc-badge]][rmc-npm] |
| Stylelint | [@almacareer/stylelint-config](packages/stylelint-config) | [![@almacareer/stylelint-config][slc-badge]][slc-npm] |
| Textlint | [@lmc-eu/textlint-rule-preset-lmc](packages/textlint-rule-preset-lmc) | [![@lmc-eu/textlint-rule-preset-lmc][tlc-badge]][tlc-npm] |

## License

Expand All @@ -34,10 +32,6 @@ We got a lot of inspiration from a similar project at [STRV][strv-github]. Thank
[alma-home]: https://www.almacareer.com
[blc-npm]: https://npmjs.org/package/%40lmc-eu/browserslist-config
[blc-badge]: https://img.shields.io/npm/v/%40lmc-eu/browserslist-config.svg?style=flat-square
[cc-bb-npm]: https://npmjs.org/package/%40lmc-eu/conventional-changelog-lmc-bitbucket
[cc-bb-badge]: https://img.shields.io/npm/v/%40lmc-eu/conventional-changelog-lmc-bitbucket.svg?style=flat-square
[cc-gh-npm]: https://npmjs.org/package/%40lmc-eu/conventional-changelog-lmc-github
[cc-gh-badge]: https://img.shields.io/npm/v/%40lmc-eu/conventional-changelog-lmc-github.svg?style=flat-square
[pc-npm]: https://www.npmjs.com/package/@lmc-eu/prettier-config
[pc-badge]: https://img.shields.io/npm/v/%40lmc-eu/prettier-config.svg?style=flat-square
[clc-npm]: https://www.npmjs.com/package/@lmc-eu/commitlint-config
Expand Down
5 changes: 3 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"version": {
"allowBranch": ["release"],
"conventionalCommits": true,
"changelogPreset": "./packages/conventional-changelog-lmc-github",
"changelogPreset": "conventional-changelog-conventionalcommits",
"createRelease": "github",
"push": false,
"message": "Chore: Release [CI-SKIP]",
"message": "chore: release [CI-SKIP]",
"ignoreChanges": ["test/**", "yarn.lock"]
}
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"devDependencies": {
"@commitlint/cli": "19.8.1",
"conventional-changelog-conventionalcommits": "^9.1.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.2",
"eslint-import-resolver-node": "0.3.9",
Expand Down
29 changes: 4 additions & 25 deletions packages/commitlint-config/index.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
module.exports = {
import conventionalConfig from '@commitlint/config-conventional';

export default {
extends: ['@commitlint/config-conventional'],
parserPreset: '@lmc-eu/conventional-changelog-lmc',
ignores: [(commit) => commit.includes('[CI-SKIP]')],
rules: {
'type-case': [
1,
'always',
// We are using `pascal-case` for every type but
// allowing `upper-case` only for use of `BREAKING CHANGE(S)`
// so this should not lead to define any other type in `upper-case`
['pascal-case', 'upper-case'],
],
'type-enum': [
2,
'always',
[
'Feat',
'Fix',
'Docs',
'Style',
'Refactor',
'Test',
'Revert',
'Perf',
'Chore',
'Deps',
'BREAKING CHANGES',
'BREAKING CHANGE',
],
[...conventionalConfig.rules['type-enum'][2], 'deps', 'BREAKING CHANGES', 'BREAKING CHANGE'],
],
'subject-case': [2, 'always', 'sentence-case'],
},
};
19 changes: 11 additions & 8 deletions packages/commitlint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
{
"name": "@lmc-eu/commitlint-config",
"name": "@alma-oss/commitlint-config",
"version": "2.0.3",
"description": "LMC's configuration for commitlint",
"description": "Alma's configuration for commitlint",
"keywords": [
"commitlint",
"lmc",
"alma",
"config"
],
"author": "Tomáš Litera <tomas.litera@lmc.eu>",
"license": "BSD-3-Clause",
"type": "module",
"author": "Tomáš Litera <tomas.litera@almacareer.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/lmc-eu/code-quality-tools",
"directory": "packages/commitlint-config"
},
"main": "index.js",
"exports": {
".": "./index.js"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": "^16 || ^18 || >=20"
"node": "^18 || >=20"
},
"dependencies": {
"@commitlint/config-conventional": "^17.0.0",
"@lmc-eu/conventional-changelog-lmc": "^2.0.3"
"@commitlint/config-conventional": "^19.0.0"
}
}
Loading