Skip to content

Commit

Permalink
hooks docs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tokyo committed Jan 17, 2024
1 parent 2e606b4 commit 0081a45
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 8 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
- uses: actions/checkout@v3
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "dir<<$EOF" >> $GITHUB_OUTPUT
echo "$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand Down Expand Up @@ -43,7 +47,11 @@ jobs:
- uses: actions/checkout@v3
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "dir<<$EOF" >> $GITHUB_OUTPUT
echo "$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand All @@ -59,12 +67,17 @@ jobs:
- name: Setup env vars
id: ownEnvVars
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
# Set PACKAGE_VERSION
PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
echo ::set-output name=PACKAGE_VERSION::$PACKAGE_VERSION
echo "PACKAGE_VERSION<<$EOF" >> $GITHUB_OUTPUT
echo "$PACKAGE_VERSION" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
# Set COMMIT_LOG
COMMIT_LOG=`git log $(git describe --tags --abbrev=0)..HEAD --date=iso-local --format='%cd %h %an - %s '`
echo ::set-output name=COMMIT_LOG::$COMMIT_LOG
echo "COMMIT_LOG<<$EOF" >> $GITHUB_OUTPUT
echo "$COMMIT_LOG" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: npm publish
run: npm publish
env:
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-plural",
"version": "0.6.8",
"version": "0.6.9",
"description": "🎨 How plural paints its code.",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -75,6 +75,7 @@
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-react-hooks-docs": "^0.0.1",
"eslint-plugin-react-perf": "^3.3.0",
"in-publish": "^2.0.1",
"react": ">= 0.13.0",
Expand All @@ -88,6 +89,7 @@
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-react-hooks-docs": "^0.0.1",
"eslint-plugin-react-perf": "^3"
},
"engines": {
Expand All @@ -100,4 +102,4 @@
"url": "https://github.com/A-Tokyo"
}
]
}
}
4 changes: 2 additions & 2 deletions rules/react.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
plugins: ['react', 'eslint-plugin-react-perf'],
plugins: ['react', 'eslint-plugin-react-perf', 'eslint-plugin-react-hooks-docs'],

extends: ['plugin:react-perf/recommended'],
extends: ['plugin:react-perf/recommended', 'plugin:eslint-plugin-react-hooks-docs/recommended'],

parserOptions: {
ecmaFeatures: {
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,13 @@ eslint-plugin-jsx-a11y@^6.5.1:
language-tags "^1.0.5"
minimatch "^3.0.4"

eslint-plugin-react-hooks-docs@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks-docs/-/eslint-plugin-react-hooks-docs-0.0.1.tgz#a4bd94b66880a2a39e18e510161e0ee0db1f4a8c"
integrity sha512-eaHeQB77v9bucj5F+to9JUEcrZ5P4360kXPzMA0MTdb9zCv8H41G2QyORaJS2I9L2AOV3w0vxX3F9H9FNY4oNA==
dependencies:
requireindex "~1.2.0"

eslint-plugin-react-hooks@^4.5.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3"
Expand Down Expand Up @@ -3759,6 +3766,11 @@ require-main-filename@^1.0.1:
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==

requireindex@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef"
integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==

resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
Expand Down

0 comments on commit 0081a45

Please sign in to comment.