Skip to content

Add v1.0.0 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2024
Merged
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
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": ["bloq", "prettier"],
"overrides": [
{
"extends": ["bloq/markdown"],
"files": ["*.md"]
}
],
"parserOptions": {
"sourceType": "module"
},
"root": true
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gabmontes
21 changes: 21 additions & 0 deletions .github/workflows/js-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: JS Checks

on:
pull_request:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- run: npm run format:check
- run: npm run lint
19 changes: 19 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: NPM Publish

on:
release:
types:
- published

jobs:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.eslintcache
.vscode
node_modules
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# commitlint-config-bloq

Shareable [commitlint](https://commitlint.js.org/) config as we do at [Bloq](https://bloq.com).

## Usage

Install the config locally:

```sh
npm install --save-dev commitlint-config-bloq
```

Then, extend your own configuration:

```json
{
"extends": ["bloq"]
}
```

## Inspiration

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.
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from "./src/index.js";

export default config;
11 changes: 11 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const lintFile = "eslint --cache --fix --quiet";
const formatFile = "prettier --ignore-unknown --write";
const sortPackageJson = "better-sort-package-json";

const config = {
"*,!*.{js,md},!package.json": [formatFile],
"*.{js,md}": [lintFile, formatFile],
"package.json": [sortPackageJson, formatFile],
};

export default config;
Loading