From 0081a454897c14ea941dd4e277f5ce06e09dc22a Mon Sep 17 00:00:00 2001 From: Tokyo Date: Wed, 17 Jan 2024 20:43:39 +0000 Subject: [PATCH] hooks docs --- .github/workflows/test-publish.yml | 21 +++++++++++++++++---- package.json | 6 ++++-- rules/react.js | 4 ++-- yarn.lock | 12 ++++++++++++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-publish.yml b/.github/workflows/test-publish.yml index ea4d3fa..6c51665 100644 --- a/.github/workflows/test-publish.yml +++ b/.github/workflows/test-publish.yml @@ -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 }} @@ -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 }} @@ -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: diff --git a/package.json b/package.json index 77a47ca..aaccfb9 100644 --- a/package.json +++ b/package.json @@ -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": [ @@ -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", @@ -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": { @@ -100,4 +102,4 @@ "url": "https://github.com/A-Tokyo" } ] -} \ No newline at end of file +} diff --git a/rules/react.js b/rules/react.js index 8320c9d..25d752d 100644 --- a/rules/react.js +++ b/rules/react.js @@ -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: { diff --git a/yarn.lock b/yarn.lock index 18266ef..4624238 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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"