diff --git a/.eslintrc b/.eslintrc index fd3ae2193c..894df7caa9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,8 @@ "coverage/", ".nyc_output/", "test-published-types/", - "tests/fixtures/flat-config/" + "tests/fixtures/flat-config/", + "**/*/*.d.ts", ], "rules": { "comma-dangle": [2, "always-multiline"], diff --git a/.github/workflows/node-18+.yml b/.github/workflows/node-18+.yml index ee7d126939..5a48b15a88 100644 --- a/.github/workflows/node-18+.yml +++ b/.github/workflows/node-18+.yml @@ -104,7 +104,7 @@ jobs: with: node-version: ${{ matrix.node-version }} after_install: | - npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.typescript-eslint }}" "babel-eslint@${{ matrix.babel-eslint }}" + npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.typescript-eslint == 8 && 8.17 || matrix.typescript-eslint }}" "babel-eslint@${{ matrix.babel-eslint }}" env: NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.typescript-eslint >= 6 && 'false' || 'true' }}" - run: npx ls-engines diff --git a/.github/workflows/node-minors.yml b/.github/workflows/node-minors.yml index 69f92684ea..9e227f2b89 100644 --- a/.github/workflows/node-minors.yml +++ b/.github/workflows/node-minors.yml @@ -100,7 +100,7 @@ jobs: with: node-version: ${{ matrix.node-version }} after_install: | - npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 18 && matrix.eslint >= 8 && '8' || (matrix.node-version >= 16 && matrix.eslint >= 7 && '6' || (matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))))) }}" "babel-eslint@${{ matrix.babel-eslint }}" + npm install --no-save "eslint@${{ matrix.eslint }}" "@typescript-eslint/parser@${{ matrix.node-version >= 18 && matrix.eslint >= 8 && '8.17' || (matrix.node-version >= 16 && matrix.eslint >= 7 && '6' || (matrix.node-version >= 14 && '5' || (matrix.node-version >= 12 && '4' || (matrix.node-version >= 10 && '4.0' || (matrix.node-version >= 8 && '3' || '2'))))) }}" "babel-eslint@${{ matrix.babel-eslint }}" skip-ls-check: ${{ matrix.node-version < 10 && true || false }} env: NPM_CONFIG_LEGACY_PEER_DEPS: "${{ matrix.node-version >= 16 && matrix.eslint >= 7 && 'false' || 'true' }}" diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8ed3becf6b..2e654951b6 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -63,7 +63,10 @@ jobs: const pending = checkSuites.filter(({ status }) => status !== 'completed') if (pending.length > 0) { - core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress: ${JSON.stringify(pending)}`); + core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress`); + pending.forEach(({ pull_requests, ...x }) => { + core.debug(JSON.stringify(x)); + }); } const result = await Promise.all( @@ -94,7 +97,7 @@ jobs: contents: read id-token: write steps: - - uses: step-security/harden-runner@v1 + - uses: step-security/harden-runner@v2 with: egress-policy: block allowed-endpoints: > @@ -102,6 +105,7 @@ jobs: nodejs.org:443 prod.api.stepsecurity.io:443 registry.npmjs.org:443 + raw.githubusercontent.com:443 - uses: actions/checkout@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a957f007c..d6f97d2e84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,11 +15,14 @@ jobs: contents: write steps: - - uses: step-security/harden-runner@v1 + - uses: step-security/harden-runner@v2 with: allowed-endpoints: api.github.com:443 github.com:443 + raw.githubusercontent.com:443 + nodejs.org:443 + registry.npmjs.org:443 - name: Get version from tag id: tag_name diff --git a/.github/workflows/type-check.yml b/.github/workflows/type-check.yml index c0e6b4d033..0aaca2cb00 100644 --- a/.github/workflows/type-check.yml +++ b/.github/workflows/type-check.yml @@ -44,18 +44,34 @@ jobs: - name: build types run: npm run build-types + # Pack the lib into a tarball so that when we install the lib later in the + # test-published-types directory, it's only install `dependencies` of the + # lib. + - name: pack the lib + run: npm pack --pack-destination /tmp/ + + - name: find the packed lib + run: echo "ESLINT_PLUGIN_REACT_PATH=$(ls /tmp/eslint-plugin-react*.tgz | tail -n 1)" >> $GITHUB_ENV + + - name: show the path to the packed lib + run: echo "$ESLINT_PLUGIN_REACT_PATH" + - name: npm install working directory run: npm install working-directory: test-published-types - - name: install typescript version ${{ matrix.ts_version }} - run: npm install --no-save typescript@${{ matrix.ts_version }} + - name: install eslint-plugin-react and typescript version ${{ matrix.ts_version }} + run: npm install --no-save "$ESLINT_PLUGIN_REACT_PATH" typescript@${{ matrix.ts_version }} working-directory: test-published-types - name: show installed typescript version run: npm list typescript --depth=0 working-directory: test-published-types + - name: show installed eslint-plugin-react version + run: npm list eslint-plugin-react --depth=0 + working-directory: test-published-types + - name: check types with lib "${{ matrix.ts_lib }}" run: npx tsc --lib ${{ matrix.ts_lib }} working-directory: test-published-types diff --git a/CHANGELOG.md b/CHANGELOG.md index f62ad8605e..9696eca775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,72 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ## Unreleased +### Added +* [`jsx-props-no-multi-spaces`]: improve autofix for multi-line ([#3930][] @justisb) + +### Fixed +* [`no-unknown-property`]: allow `onLoad` on `body` ([#3923][] @DerekStapleton) + +[#3930]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3930 +[#3923]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3923 + +## [7.37.5] - 2025.04.03 + +### Fixed +* [`no-unknown-property`]: allow shadow root attrs on `