Skip to content

Commit

Permalink
chore: remove usage of git hooks (husky, lint-staged, commitlint) + u…
Browse files Browse the repository at this point in the history
…sage of node --run
  • Loading branch information
theoludwig committed Sep 6, 2024
1 parent 85f4653 commit dd70d6d
Show file tree
Hide file tree
Showing 16 changed files with 725 additions and 3,718 deletions.
1 change: 0 additions & 1 deletion .commitlintrc.json

This file was deleted.

11 changes: 2 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{
"extends": ["conventions", "prettier"],
"plugins": ["prettier", "import", "unicorn"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"prettier/prettier": "error",
"import/extensions": ["error", "always"]
}
"extends": ["conventions"],
"plugins": ["promise", "unicorn"]
}
26 changes: 16 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,32 @@ on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
branches: [main, develop]

jobs:
lint:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/[email protected].1"
- uses: "actions/[email protected].7"

- name: "Setup Node.js"
uses: "actions/[email protected].2"
uses: "actions/[email protected].3"
with:
node-version: "lts/*"
node-version: "22.x"
cache: "npm"

- name: "Install dependencies"
run: "npm clean-install"

- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: "npm run lint:editorconfig"
- run: "npm run lint:markdown"
- run: "npm run lint:eslint"
- run: "npm run lint:prettier"
- run: "npm run lint:javascript"
- run: "node --run lint:editorconfig"
- run: "node --run lint:markdown"
- run: "node --run lint:eslint"
- run: "node --run lint:prettier"
- run: "node --run lint:javascript"

commitlint:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/[email protected]"

- uses: "wagoid/[email protected]"
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Release"

on:
push:
branches: [master]
branches: [main]

jobs:
release:
Expand All @@ -13,15 +13,15 @@ jobs:
pull-requests: "write"
id-token: "write"
steps:
- uses: "actions/[email protected].1"
- uses: "actions/[email protected].7"
with:
fetch-depth: 0
persist-credentials: false

- name: "Setup Node.js"
uses: "actions/[email protected].2"
uses: "actions/[email protected].3"
with:
node-version: "lts/*"
node-version: "22.x"
cache: "npm"

- name: "Install dependencies"
Expand All @@ -31,7 +31,7 @@ jobs:
run: "npm audit signatures"

- name: "Release"
run: "npm run release"
run: "node --run release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
branches: [main, develop]

jobs:
test:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/[email protected].1"
- uses: "actions/[email protected].7"

- name: "Setup Node.js"
uses: "actions/[email protected].2"
uses: "actions/[email protected].3"
with:
node-version: "lts/*"
node-version: "22.x"
cache: "npm"

- name: "Install dependencies"
run: "npm clean-install"

- name: "Test"
run: "npm run test"
run: "node --run test"
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ npm-debug.log*

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
.DS_Store
3 changes: 0 additions & 3 deletions .husky/commit-msg

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

7 changes: 0 additions & 7 deletions .lintstagedrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
save-exact=true
provenance=true
save-exact = true
provenance = true
16 changes: 3 additions & 13 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
{
"branches": ["master"],
"branches": ["main", { "name": "beta", "prerelease": true }],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"
]
Expand Down
8 changes: 0 additions & 8 deletions .vscode/extensions.json

This file was deleted.

8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ We recommend configuring [markdownlint-cli2](https://github.com/DavidAnson/markd
## Usage

```sh
npm run lint:markdown
node --run lint:markdown
```

## 💡 Contributing
Expand Down
Loading

0 comments on commit dd70d6d

Please sign in to comment.