-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from mzwallace/modules
Upgrade to ESM modules
- Loading branch information
Showing
35 changed files
with
2,648 additions
and
2,762 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,21 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: false, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:unicorn/recommended", | ||
"plugin:prettier/recommended", | ||
], | ||
plugins: ["prettier"], | ||
parserOptions: { | ||
ecmaVersion: 13, | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
"unicorn/no-process-exit": "off", | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ test/data/* | |
npm-debug.log | ||
.vscode | ||
jsconfig.json | ||
.history/ |
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 @@ | ||
_ |
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 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
bash bin/post-merge |
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 | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"quoteProps": "consistent" | ||
} |
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 |
---|---|---|
@@ -1,11 +1,20 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
# MIT © Sindre Sorhus - sindresorhus.com | ||
|
||
# git hook to run a command after `git pull` if a specified file was changed | ||
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | ||
|
||
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | ||
|
||
check_run() { | ||
echo "$changed_files" | grep --quiet "$1" && eval "$2" | ||
if echo "$changed_files" | grep -q $1; then | ||
echo "$1 changed. Running '$2'" | ||
eval "$2" | ||
echo "" | ||
fi | ||
# echo "$changed_files" | grep --quiet "$1" && eval "$2" | ||
} | ||
|
||
check_run package.json "npm install" | ||
check_run package-lock.json "npm i" | ||
|
||
exit 0 |
Oops, something went wrong.