Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix tsc in action #1140

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 37 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
uses: actions/checkout@v4

- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: cache package-lock.json
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: package-temp-dir
key: lock-${{ github.sha }}
Expand All @@ -34,7 +34,7 @@ jobs:
cp package-lock.json package-temp-dir
- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
Expand All @@ -47,16 +47,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
uses: actions/checkout@v4

- name: restore cache from package-lock.json
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
Expand All @@ -66,20 +66,43 @@ jobs:

needs: setup

tsc:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: restore cache from package-lock.json
uses: actions/cache@v4
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: tsc
run: npm run tsc

needs: setup

compile:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
uses: actions/checkout@v4

- name: restore cache from package-lock.json
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
Expand All @@ -93,16 +116,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
uses: actions/checkout@v4

- name: restore cache from package-lock.json
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
Expand Down
14 changes: 1 addition & 13 deletions docs/examples/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface DataType {
gender: string;
}

const columns: TableProps['columns'] = [
const columns: ColumnsType<any> = [
{
title: 'Other',
fixed: 'left',
Expand All @@ -29,7 +29,6 @@ const columns: TableProps['columns'] = [
width: 150,
fixed: 'left',
ellipsis: true,
sorter: (a, b) => a.age - b.age,
},
{
title: 'Address',
Expand Down Expand Up @@ -72,17 +71,6 @@ const columns: TableProps['columns'] = [
dataIndex: 'name',
key: 'name',
width: 100,
filters: [
{
text: 'Joe',
value: 'Joe',
},
{
text: 'John',
value: 'John',
},
],
onFilter: (value: string, record) => record.name.indexOf(value) === 0,
},
{
title: 'Company',
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"coverage": "vitest run --coverage",
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
"lint": "eslint src/ --ext .tsx,.ts",
"lint:tsc": "tsc -p tsconfig.json --noEmit",
"tsc": "tsc -p tsconfig.json --noEmit",
"now-build": "npm run docs:build",
"prepare": "husky install"
},
Expand Down Expand Up @@ -108,8 +108,7 @@
},
"lint-staged": {
"**/*.{js,jsx,tsx,ts,md,json}": [
"prettier --write",
"git add"
"prettier --write"
]
}
}
Loading