Skip to content

Commit

Permalink
feat: port over cspell hook implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarJaroudi committed Jul 3, 2024
1 parent 6e945a7 commit 235091b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@turo:registry=https://turo.jfrog.io/turo/api/npm/npm/
//turo.jfrog.io/turo/api/npm/npm/:_auth="${NPM_AUTH_TOKEN}"
//turo.jfrog.io/turo/api/npm/npm/:always-auth=true
7 changes: 7 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,10 @@
language: script
entry: hooks/yalc/yalc-check.sh
files: package\.json
######################
# Cspell hook
- id: cspell
name: "Run cspell-cli to check for spelling errors"
description: "Errors if there are spelling errors not whitelisted"
entry: cspell-cli
language: node
3 changes: 3 additions & 0 deletions hooks/cspell/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

import "cspell/bin";
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"bin": {
"cspell-cli": "./hooks/cspell/index.js"
},
"type": "module",
"dependencies": {
"cspell": "8.10.0"
},
"name": "@turo/pre-commit-hooks",
"private": true,
"version": "1.0.0"
}

0 comments on commit 235091b

Please sign in to comment.