Skip to content

Commit 3cbae52

Browse files
Merge pull request #88 from meriouma/fix-negative-numbers
fix: number default value cannot be negative with Typescript 5.4
2 parents 99391d3 + 43e31d2 commit 3cbae52

9 files changed

Lines changed: 3031 additions & 2795 deletions

File tree

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"xo",
55
"prettier",
66
"plugin:@typescript-eslint/recommended",
7-
"prettier/@typescript-eslint",
87
"plugin:jest/recommended",
98
"plugin:jest/style"
109
],
@@ -20,6 +19,7 @@
2019
},
2120
"rules": {
2221
"@typescript-eslint/explicit-function-return-type": 0,
22+
"@typescript-eslint/no-explicit-any": 0,
2323
"@typescript-eslint/camelcase": 0,
2424
"complexity": 0,
2525
"import/no-unresolved": 0,

.github/workflows/push.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ name: Node CI
33
on:
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88
branches:
9-
- master
9+
- master
1010

1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414

1515
strategy:
1616
matrix:
17-
node-version: [12.x, 14.x]
17+
node-version: [18.x, 20.x]
1818

1919
steps:
20-
- uses: actions/checkout@v1
21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v1
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
- name: npm install, build, and lint
26-
run: |
27-
yarn
28-
yarn build
29-
yarn lint
30-
yarn test
20+
- uses: actions/checkout@v1
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- name: npm install, build, and lint
26+
run: |
27+
yarn
28+
yarn build
29+
yarn lint
30+
yarn test
3131
3232
release:
3333
runs-on: ubuntu-latest
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Create Release
4747
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4949
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5050
run: |
5151
yarn install --frozen-lockfile

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
.idea
12
node_modules
23
dist
34
example-dist
45
coverage
56
.env
7+
yarn-error.log

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,37 @@
3939
"flat-cache": "^3.0.4",
4040
"micromatch": "^4.0.2",
4141
"react-docgen-typescript": "^2.2.2",
42-
"tslib": "^2.0.0"
42+
"tslib": "^2.6.2"
4343
},
4444
"devDependencies": {
4545
"@types/debug": "^4.1.5",
4646
"@types/find-cache-dir": "^3.2.0",
4747
"@types/flat-cache": "^2.0.0",
48-
"@types/jest": "^26.0.23",
48+
"@types/jest": "^29.5.12",
4949
"@types/micromatch": "^4.0.1",
5050
"@types/node": "^14.0.12",
5151
"@types/react": "^17.0.0",
52-
"@typescript-eslint/eslint-plugin": "^4.9.0",
53-
"@typescript-eslint/parser": "^4.9.0",
54-
"auto": "^10.2.3",
52+
"@typescript-eslint/eslint-plugin": "^7.3.1",
53+
"@typescript-eslint/parser": "^7.3.1",
54+
"auto": "^11.1.1",
5555
"auto-config-hipstersmoothie": "^4.0.0",
56-
"eslint": "^7.14.0",
57-
"eslint-config-airbnb-base": "^14.2.1",
58-
"eslint-config-prettier": "6.11.0",
59-
"eslint-config-xo": "0.29.1",
60-
"eslint-plugin-import": "^2.22.1",
61-
"eslint-plugin-jest": "^24.1.3",
62-
"eslint-plugin-jsdoc": "25.2.0",
63-
"eslint-plugin-jsx-a11y": "^6.4.1",
64-
"eslint-plugin-prettier": "3.1.3",
65-
"jest": "^26.6.3",
56+
"eslint": "^8.57.0",
57+
"eslint-config-airbnb-base": "^15.0.0",
58+
"eslint-config-prettier": "^9.1.0",
59+
"eslint-config-xo": "^0.44.0",
60+
"eslint-plugin-import": "^2.29.1",
61+
"eslint-plugin-jest": "^27.9.0",
62+
"eslint-plugin-jsdoc": "^48.2.1",
63+
"eslint-plugin-jsx-a11y": "^6.8.0",
64+
"eslint-plugin-prettier": "^5.1.3",
65+
"jest": "^29.7.0",
6666
"memfs": "^3.2.2",
6767
"memory-fs": "^0.5.0",
6868
"prettier": "^2.0.5",
6969
"react": "^17.0.1",
70-
"ts-jest": "^26.5.6",
70+
"ts-jest": "^29.1.2",
7171
"ts-loader": "^9.1.2",
72-
"typescript": "4.8.3",
72+
"typescript": "5.4.2",
7373
"webpack": "^5.36.2",
7474
"webpack-cli": "^4.7.0",
7575
"yarn-add-no-save": "^1.0.3"

src/__tests__/__fixtures__/DefaultPropValue.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ interface DefaultPropValueComponentProps {
1717
* Button disabled.
1818
*/
1919
disabled: boolean;
20+
21+
tabIndex: number;
2022
}
2123

2224
/**
@@ -34,4 +36,5 @@ export const DefaultPropValueComponent: React.FC<DefaultPropValueComponentProps>
3436
DefaultPropValueComponent.defaultProps = {
3537
counter: 123,
3638
disabled: false,
39+
tabIndex: -1,
3740
};

0 commit comments

Comments
 (0)