Skip to content

Commit 4710656

Browse files
committed
1.0.0
1 parent aac896d commit 4710656

15 files changed

+5559
-0
lines changed

.eslintrc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": ["bloq", "prettier"],
3+
"overrides": [
4+
{
5+
"extends": ["bloq/markdown"],
6+
"files": ["*.md"]
7+
}
8+
],
9+
"parserOptions": {
10+
"sourceType": "module"
11+
},
12+
"root": true
13+
}

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gabmontes

.github/workflows/js-checks.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: JS Checks
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
run-checks:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version-file: .nvmrc
19+
- run: npm ci
20+
- run: npm run format:check
21+
- run: npm run lint

.github/workflows/npm-publish.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: NPM Publish
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
publish-to-npm:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version-file: .nvmrc
16+
- run: npm ci
17+
- uses: JS-DevTools/npm-publish@v3
18+
with:
19+
token: ${{ secrets.NPM_TOKEN }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.eslintcache
2+
.vscode
3+
node_modules

.husky/commit-msg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx commitlint --edit $1

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# commitlint-config-bloq
2+
3+
Shareable [commitlint](https://commitlint.js.org/) config as we do at [Bloq](https://bloq.com).
4+
5+
## Usage
6+
7+
Install the config locally:
8+
9+
```sh
10+
npm install --save-dev commitlint-config-bloq
11+
```
12+
13+
Then, extend your own configuration:
14+
15+
```json
16+
{
17+
"extends": ["bloq"]
18+
}
19+
```
20+
21+
## Inspiration
22+
23+
The rules this package sets are based on [The seven rules of a great Git commit message](https://cbea.ms/git-commit/), a 2014 post by [Chris Beams](https://twitter.com/cbeams) worth reading even today.

commitlint.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from "./src/index.js";
2+
3+
export default config;

lint-staged.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const lintFile = "eslint --cache --fix --quiet";
2+
const formatFile = "prettier --ignore-unknown --write";
3+
const sortPackageJson = "better-sort-package-json";
4+
5+
const config = {
6+
"*,!*.{js,md},!package.json": [formatFile],
7+
"*.{js,md}": [lintFile, formatFile],
8+
"package.json": [sortPackageJson, formatFile],
9+
};
10+
11+
export default config;

0 commit comments

Comments
 (0)