-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up "repo-tools" project to register Git hooks
- Loading branch information
Showing
11 changed files
with
224 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#------------------------------------------------------------------------------------------------------------------- | ||
# Keep this section in sync with .gitignore | ||
#------------------------------------------------------------------------------------------------------------------- | ||
|
||
# Logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
|
||
# OS X temporary files | ||
.DS_Store | ||
|
||
# IntelliJ IDEA project files; if you want to commit IntelliJ settings, this recipe may be helpful: | ||
# https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
.idea/ | ||
*.iml | ||
|
||
# Heft temporary files | ||
.heft | ||
|
||
# build result | ||
build | ||
lib | ||
temp | ||
dist | ||
build_* | ||
|
||
#------------------------------------------------------------------------------------------------------------------- | ||
# Prettier-specific overrides | ||
#------------------------------------------------------------------------------------------------------------------- | ||
|
||
# Machine-egnerated files | ||
CHANGELOG.* | ||
pnpm-lock.yaml | ||
dist-dev | ||
dist-prod | ||
|
||
# We'll consider enabling this later; Prettier reformats code blocks, which affects end-user content | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Documentation for this file: https://prettier.io/docs/en/configuration.html | ||
module.exports = { | ||
// We use a larger print width because Prettier's word-wrapping seems to be tuned | ||
// for plain JavaScript without type annotations | ||
printWidth: 110, | ||
// Microsoft style quotes | ||
singleQuote: true, | ||
// Preserve existing newlines | ||
endOfLine: 'auto', | ||
// For ES5, trailing commas cannot be used in function parameters; it is counterintuitive | ||
// to use them for arrays only | ||
trailingComma: 'none' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
packages/repo-tools/node_modules/.bin/pretty-quick --staged | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "repo-tools", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"prepare": "node scripts/install-git-hooks.js" | ||
}, | ||
"dependencies": { | ||
"prettier": "^3.2.5", | ||
"pretty-quick": "^4.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
console.log('Installing Git hooks...'); | ||
fs.copyFileSync( | ||
path.join(__dirname, '../git-hooks/pre-commit'), | ||
path.join(__dirname, '../../../.git/hooks/pre-commit') | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters