-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
134 additions
and
4 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
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,61 @@ | ||
name: "Types: check published types" | ||
|
||
on: [pull_request, push] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: TS ${{ matrix.ts_version }}, "${{ matrix.ts_lib }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ts_version: | ||
# The official ESLint types are not compatible with TS 3.9 | ||
# - 3.9 | ||
- '4.0' | ||
- 4.1 | ||
- 4.2 | ||
- 4.3 | ||
- 4.4 | ||
- 4.5 | ||
- '5.0' | ||
- 5.5 | ||
- 5.6 | ||
ts_lib: | ||
- es2015 | ||
- es2015,dom | ||
- es2020 | ||
- esnext | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
show-progress: false | ||
|
||
- uses: ljharb/actions/node/install@main | ||
name: 'nvm install lts/* && npm install' | ||
with: | ||
node-version: 'lts/*' | ||
skip-ls-check: true | ||
|
||
- name: build types | ||
run: npm run build-types | ||
|
||
- 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 }} | ||
working-directory: test-published-types | ||
|
||
- name: show installed typescript version | ||
run: npm list typescript --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 |
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,12 @@ | ||
{ | ||
"extends": "./tsconfig", | ||
"files": [ | ||
"index.js" | ||
], | ||
"compilerOptions": { | ||
"declaration": true, | ||
"declarationMap": true, | ||
"noEmit": false, | ||
"emitDeclarationOnly": true | ||
} | ||
} |
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
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 @@ | ||
package-lock=false |
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 @@ | ||
'use strict'; | ||
|
||
const react = require('eslint-plugin-react'); | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
module.exports = [ | ||
{ | ||
plugins: { | ||
react, | ||
}, | ||
}, | ||
]; |
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,9 @@ | ||
{ | ||
"name": "eslint-plugin-react-test-published-types", | ||
"private": true, | ||
"version": "0.0.0", | ||
"dependencies": { | ||
"eslint": "^9.11.1", | ||
"eslint-plugin-react": "file:.." | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
|
||
"files": [ | ||
"index.js" | ||
], | ||
|
||
"compilerOptions": { | ||
"lib": ["esnext"], | ||
"types": ["node"] | ||
} | ||
} |